Re: SQL Property Graph Queries (SQL/PGQ)

Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>

From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, assam258@gmail.com, Amit Langote <amitlangote09@gmail.com>, Junwang Zhao <zhjwpku@gmail.com>, Vik Fearing <vik@postgresfriends.org>, Ajay Pal <ajay.pal.k@gmail.com>, Imran Zaheer <imran.zhir@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-05-16T12:12:20Z
Lists: pgsql-hackers
Hi Alexander,

On Sat, May 16, 2026 at 5:30 PM Alexander Lakhin <exclusion@gmail.com> wrote:
>
> Hello hackers,
>
> Please look at an internal error produced with the following script added
> to src/test/regress/sql/graph_table.sql:
> CREATE TABLE x(a int);
> SELECT * FROM x, GRAPH_TABLE (myshop MATCH (c IS customers) ->(l IS orders | wishlists) COLUMNS (c.name, x.a AS a));
>
> ERROR:  XX000: plan should not reference subplan's variable
> LOCATION:  finalize_plan, subselect.c:3159

Thanks for the report. It will be better to start a new thread for
SQL/PGQ issues so that they can be tracked in open items if required.

I am wondering if this issue is related to the issue reported at [1]
and has the same root cause.

[1] https://www.postgresql.org/message-id/CAHg+QDfnLzsgjaQ_CiKSpP4JH3MKOiwoawEcCzXa9uYr45yiWw@mail.gmail.com

-- 
Best Wishes,
Ashutosh Bapat