Summary
Unknown sequence in a DEFAULT expression raises SQLSTATE 42601
(plan error) today. PostgreSQL uses 42704 (undefined_object) for
nextval('missing'); the code already carries the message naming the
missing sequence, only the class is generic.
Scope
Five-file promotion path identified: error types variant, sequence_default
convert site, pgwire + gateway error maps, DDL dispatch check (~20 lines).
Related: #294 (tracked as out-of-scope candidate), #303
Reproduction
CREATE SEQUENCE s;
CREATE COLLECTION t (id BIGINT DEFAULT nextval('missing'), v TEXT) WITH (engine = 'kv');
INSERT INTO t (v) VALUES ('x'); -- SQLSTATE 42601 today; PostgreSQL: 42704
Summary
Unknown sequence in a DEFAULT expression raises SQLSTATE 42601
(plan error) today. PostgreSQL uses 42704 (undefined_object) for
nextval('missing'); the code already carries the message naming themissing sequence, only the class is generic.
Scope
Five-file promotion path identified: error types variant, sequence_default
convert site, pgwire + gateway error maps, DDL dispatch check (~20 lines).
Related: #294 (tracked as out-of-scope candidate), #303
Reproduction