Re: pgsql: SQL Property Graph Queries (SQL/PGQ)

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: SQL Property Graph Queries (SQL/PGQ)
Date: 2026-03-17 04:03:34
Message-ID: CAEG8a3+9Qa-0t-Sk-8Hg7e9QoU7zRXGOXCuZd2JM6G05iAWX8A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Hi Andrew,

On Tue, Mar 17, 2026 at 11:10 AM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
>
> On Tue, Mar 17, 2026 at 12:35 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> >
> >
> > -
> >
> >
> > On 2026-03-16 Mo 5:20 AM, Peter Eisentraut wrote:
> > > SQL Property Graph Queries (SQL/PGQ)
> > >
> > > Implementation of SQL property graph queries, according to SQL/PGQ
> > > standard (ISO/IEC 9075-16:2023).
> > >
> > > This adds:
> > >
> > > - GRAPH_TABLE table function for graph pattern matching
> > > - DDL commands CREATE/ALTER/DROP PROPERTY GRAPH
> > > - several new system catalogs and information schema views
> > > - psql \dG command
> > > - pg_get_propgraphdef() function for pg_dump and psql
> > >
> > > A property graph is a relation with a new relkind RELKIND_PROPGRAPH.
> > > It acts like a view in many ways. It is rewritten to a standard
> > > relational query in the rewriter. Access privileges act similar to a
> > > security invoker view. (The security definer variant is not currently
> > > implemented.)
> > >
> > > Starting documentation can be found in doc/src/sgml/ddl.sgml and
> > > doc/src/sgml/queries.sgml.
> > >
> >
> > The output of make_propgraphdef_labels() is not stable in the face of an
> > upgrade which will not preserve the OID sort of the labels. The explains
> > the failure at
> > <https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=crake&dt=2026-03-16%2009%3A27%3A04&stg=xversion-upgrade-HEAD-HEAD>.
> > I think we need to sort the labels by name, along the lines of the
> > attached. Or else teach the binary upgrade code to use the same labels,
> > as we do for some other things. Not sure how possible that is, nor how
> > worth it.
>
> +1 for sorting by label names, the patch LGTM.

I just noticed that Peter and Ashutosh had a patch for the same
fix by using list_sort[1], you might want to join the discussion there.

[1] https://www.postgresql.org/message-id/CAExHW5te5O-QGVhN6YADeFYDDb2oi%3DU50u62ojRcVAiZ-AEF-g%40mail.gmail.com

>
> >
> > We also need to fence the dependency check in pg_dump.c (also in the
> > attached patch)
>
> +1
>
> >
> >
> > cheers
> >
> >
> > andrew
> >
> >
> >
> > --
> > Andrew Dunstan
> > EDB: https://www.enterprisedb.com
>
>
>
> --
> Regards
> Junwang Zhao

--
Regards
Junwang Zhao

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-03-17 04:26:11 pgsql: Add regression test for ALTER TABLE .. NO INHERIT on typed table
Previous Message Michael Paquier 2026-03-17 03:57:14 pgsql: Tweak TAP test for worker terminations in worker_spi