You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Postgres: support OVERRIDING { SYSTEM | USER } VALUE in INSERT #2624
PostgreSQL's INSERT accepts OVERRIDING { SYSTEM | USER } VALUE between the column list and the source (it controls whether supplied values or the sequence are used for identity columns). sqlparser rejects it, in both the PostgreSQL and the generic dialect.
Reproduction (sqlparser 0.63.0)
use sqlparser::{dialect::PostgreSqlDialect, parser::Parser};let sql = "INSERT INTO t (id, a) OVERRIDING SYSTEM VALUE VALUES (1, 'x')";Parser::parse_sql(&PostgreSqlDialect{}, sql).unwrap();
sql parser error: Expected: SELECT, VALUES, or a subquery in the query body, found: OVERRIDING at Line: 1, Column: 23
OVERRIDING USER VALUE fails the same way. Both statements run on PostgreSQL (checked on 16.15):
CREATETABLEt (id int GENERATED ALWAYS AS IDENTITY, a text);
INSERT INTO t (id, a) OVERRIDING SYSTEM VALUE VALUES (1, 'x');
INSERT INTO t (id, a) OVERRIDING USER VALUE VALUES (1, 'x');
Activity