Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,16 @@ we consider support for the different data types separately for batch inserts an
see [here](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME) -
so we decided not to implement support for it.

*** 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. These are the data types that require this conversion:
*** 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.
These are the data types that require this conversion:
1. `macaddr8`
2. `json`
3. `jsonb`
4. `jsonpath`
5. `xml`
6. `enum`
2. `jsonpath`
3. `xml`
4. `enum`

An example of this conversion:
```sql
INSERT INTO tab1 (json_field) VALUES (sqlc.narg('json_field')::json);
INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8);
```

</details>
Expand Down
14 changes: 6 additions & 8 deletions docs/04_Postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,16 @@ we consider support for the different data types separately for batch inserts an
see [here](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME) -
so we decided not to implement support for it.

*** 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. These are the data types that require this conversion:
*** 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.
These are the data types that require this conversion:
1. `macaddr8`
2. `json`
3. `jsonb`
4. `jsonpath`
5. `xml`
6. `enum`
2. `jsonpath`
3. `xml`
4. `enum`

An example of this conversion:
```sql
INSERT INTO tab1 (json_field) VALUES (sqlc.narg('json_field')::json);
INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8);
```

</details>
Expand Down