Skip to content

fix(postgres): support select with ordinality#2665

Open
nguyenmp wants to merge 1 commit into
taozhi8833998:masterfrom
tryretool:marknguyen/with_ordinality
Open

fix(postgres): support select with ordinality#2665
nguyenmp wants to merge 1 commit into
taozhi8833998:masterfrom
tryretool:marknguyen/with_ordinality

Conversation

@nguyenmp

@nguyenmp nguyenmp commented Jun 6, 2026

Copy link
Copy Markdown

Postgres supports WITH ORDINALITY: https://www.postgresql.org/docs/18/sql-select.html

Example:

SELECT * FROM unnest(ARRAY['a','b','c','d','e','f']) WITH ORDINALITY;
 unnest | ordinality
--------+----------
 a      |        1
 b      |        2
 c      |        3
 d      |        4
 e      |        5
 f      |        6

Postgres supports `WITH ORDINALITY`: https://www.postgresql.org/docs/18/sql-select.html

Example:

```
SELECT * FROM unnest(ARRAY['a','b','c','d','e','f']) WITH ORDINALITY;
 unnest | ordinality
--------+----------
 a      |        1
 b      |        2
 c      |        3
 d      |        4
 e      |        5
 f      |        6

```
Comment thread ast/postgresql.ts
type KW_VARIANT = never;

type KW_OBJECT = never;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a bug on master, master is out of date. Needs to regenerate this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant