Re: [Bug] Add the missing RTE_GRAPH_TABLE case to transformLockingClause()

From: Zhenwei Shang <a934172442(at)gmail(dot)com>
To: SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: [Bug] Add the missing RTE_GRAPH_TABLE case to transformLockingClause()
Date: 2026-05-07 08:40:43
Message-ID: CABv9HUnGQe7dFYPy=R349_-sm9UjB4uCoOviPWUV_yijWpP0BA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

在 2026/5/7 15:37, SATYANARAYANA NARLAPURAM 写道:
> Hi Hackers,
>
> Add the missing RTE_GRAPH_TABLE case to transformLockingClause().
> Without this four
> row-locking strengths applied to a GRAPH_TABLE alias triggers not give
> a user friendly
> error message.
>
> Repro:
>
> CREATE TABLE v(id int PRIMARY KEY, vname text);
> CREATE PROPERTY GRAPH g VERTEX TABLES (v);
> SELECT * FROM GRAPH_TABLE(g MATCH (a) COLUMNS (a.vname)) gt
> FOR UPDATE OF gt;
> -- ERROR: unrecognized RTE type: 8
>
> Attached a patch that returns ERRCODE_FEATURE_NOT_SUPPORTED "FOR ...
> cannot be
> applied to a GRAPH_TABLE" with a position pointer, matching the
> convention used by
> the function/tablefunc etc. Patch includes tests for all four locking
> strengths.
> Since the code path looks simple we can just keep one of them as well
> and trim other
> tests. Thoughts?
>
> Thanks,
> Satya

The change is straightforward, clearly an improvement to me. I think you
may keep all 4 cases as they are light.

Regards,
Zhenwei Shang

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-05-07 08:43:01 Re: Fix bug with accessing to temporary tables of other sessions
Previous Message Nitin Motiani 2026-05-07 08:35:36 Re: Adding pg_dump flag for parallel export to pipes