Summary
Sequence accessors in SELECT-list over table rows raise 0A000 by design
(constant contexts — FROM-less SELECT, VALUES — evaluate for real, see
#307). Per-row evaluation is the remaining step: SELECT nextval('s') FROM t should advance per output row like PostgreSQL.
Scope
Needs a plan-level CP marker plus a post-DP stamping stage in the control
response path that preserves output-row order (single-source scans first;
joins/unions ordering documented). RETURNING per-row evaluation rides the
same seam.
Related: #294, #303, #307
Reproduction
CREATE SEQUENCE s;
CREATE COLLECTION t (id BIGINT, v TEXT) WITH (engine = 'kv');
INSERT INTO t (id, v) VALUES (1, 'a'), (2, 'b');
SELECT id, nextval('s') FROM t; -- 0A000 today; PostgreSQL: advances per row
Summary
Sequence accessors in SELECT-list over table rows raise 0A000 by design
(constant contexts — FROM-less SELECT, VALUES — evaluate for real, see
#307). Per-row evaluation is the remaining step:
SELECT nextval('s') FROM tshould advance per output row like PostgreSQL.Scope
Needs a plan-level CP marker plus a post-DP stamping stage in the control
response path that preserves output-row order (single-source scans first;
joins/unions ordering documented). RETURNING per-row evaluation rides the
same seam.
Related: #294, #303, #307
Reproduction