Skip to content

Adding support for SQL/PGQ syntax #301

@Dtenwolde

Description

@Dtenwolde

Hi there,

I'd like to propose adding support for the new Property Graph Queries (SQL/PGQ) syntax from the SQL:2023 standard to libpg_query.

Background

SQL/PGQ introduces a visual graph syntax to make pattern matching and path-finding on graph data easier. As part of developing DuckPGQ, a popular DuckDB extension, we have already implemented a significant portion of the SQL/PGQ grammar in our own fork of libpg_query.

You can find our current implementation here:
https://github.com/cwida/duckdb-pgq/blob/main/third_party/libpg_query/grammar/statements/pgq.y

Proposal

I would be happy to work on a pull request to contribute this implementation upstream to libpg_query.

I'm aware that PostgreSQL has its own SQL/PGQ support in development (as discussed here). My implementation could serve as a solid starting point, and we can of course align it with the official PostgreSQL version as it becomes finalized.

This issue is intended to gauge interest and discuss the best path forward. I think native SQL/PGQ support would be a fantastic addition, making it easier for the many systems that rely on libpg_query to adopt the new standard.

Would you be open to a contribution for this feature?

Let me know your thoughts!

Kind regards,
Daniel ten Wolde

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions