Skip to content

Commit e13d586

Browse files
fix: update Postgres docs (#308)
1 parent 00bb0ad commit e13d586

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,16 @@ we consider support for the different data types separately for batch inserts an
229229
see [here](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME) -
230230
so we decided not to implement support for it.
231231

232-
*** Some data types require conversion in the INSERT statement, and SQLC disallows argument conversion in queries with `:copyfrom` annotation,
233-
which are used for batch inserts. These are the data types that require this conversion:
232+
*** Some data types require conversion in the INSERT statement, and SQLC disallows argument conversion in queries with `:copyfrom` annotation, which are used for batch inserts.
233+
These are the data types that require this conversion:
234234
1. `macaddr8`
235-
2. `json`
236-
3. `jsonb`
237-
4. `jsonpath`
238-
5. `xml`
239-
6. `enum`
235+
2. `jsonpath`
236+
3. `xml`
237+
4. `enum`
240238

241239
An example of this conversion:
242240
```sql
243-
INSERT INTO tab1 (json_field) VALUES (sqlc.narg('json_field')::json);
241+
INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8);
244242
```
245243

246244
</details>

docs/04_Postgres.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,16 @@ we consider support for the different data types separately for batch inserts an
7272
see [here](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME) -
7373
so we decided not to implement support for it.
7474

75-
*** Some data types require conversion in the INSERT statement, and SQLC disallows argument conversion in queries with `:copyfrom` annotation,
76-
which are used for batch inserts. These are the data types that require this conversion:
75+
*** Some data types require conversion in the INSERT statement, and SQLC disallows argument conversion in queries with `:copyfrom` annotation, which are used for batch inserts.
76+
These are the data types that require this conversion:
7777
1. `macaddr8`
78-
2. `json`
79-
3. `jsonb`
80-
4. `jsonpath`
81-
5. `xml`
82-
6. `enum`
78+
2. `jsonpath`
79+
3. `xml`
80+
4. `enum`
8381

8482
An example of this conversion:
8583
```sql
86-
INSERT INTO tab1 (json_field) VALUES (sqlc.narg('json_field')::json);
84+
INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8);
8785
```
8886

8987
</details>

0 commit comments

Comments
 (0)