Skip to content

support column definition list in table alias for postgres #1524

Closed
@lovasoa

Description

@lovasoa

Postgres supports specifying column names AND types in a table alias (after AS) for functions that return values of type "record".

The following syntax is valid in postgres

SELECT * FROM jsonb_to_record('{"a": "x", "b": 2}'::jsonb) AS x(a TEXT, b INT);

But in sqlparser, it returns

Expected: ), found: TEXT

This was initially reported in SQLPage, as: sqlpage/SQLPage#690

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions