diff options
| author | Hiroshi Inoue | 2017-09-12 02:55:23 +0000 |
|---|---|---|
| committer | Hiroshi Inoue | 2017-09-12 04:02:34 +0000 |
| commit | d984e5804bbc0ed10409ae5b85c4bd69bad4c29e (patch) | |
| tree | ee0923587f047a14d84b0e7d7f9026b01b3917e8 /execute.c | |
| parent | 48289237fa1f538096519014d0946091304d7711 (diff) | |
Handle PG 10 identity columns.
Diffstat (limited to 'execute.c')
| -rw-r--r-- | execute.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -805,7 +805,7 @@ SC_setInsertedTable(StatementClass *stmt, RETCODE retval) if (strnicmp(cmd, "into", len)) return; cmd += len; - while (isspace((UCHAR) *(++cmd))); + while (isspace((UCHAR) *cmd)) cmd++; if (!*cmd) return; NULL_THE_NAME(conn->schemaIns); @@ -830,6 +830,18 @@ SC_setInsertedTable(StatementClass *stmt, RETCODE retval) STRN_TO_NAME(conn->tableIns, token, len); } } + if (token && (token = next_name_token(token, &len)) && *token == '.') + { + token = next_name_token(token, &len); + if (token) { + if (NAME_IS_VALID(conn->tableIns)) + MOVE_NAME(conn->schemaIns, conn->tableIns); + if (*token == IDENTIFIER_QUOTE) + STRN_TO_NAME(conn->tableIns, token + 1, len - 2); + else + STRN_TO_NAME(conn->tableIns, token, len); + } + } if (!NAME_IS_VALID(conn->tableIns)) NULL_THE_NAME(conn->schemaIns); |
