Re: Wrong query result w/ propgraph single lateral col reference

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

From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org
Date: 2026-07-08T13:29:33Z
Lists: pgsql-hackers
On Wed, Jul 8, 2026 at 2:35 PM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> I would like this code to be organized differently.  Note that the
> existing insert_*_record functions don't do any error checking; they are
> just there to make catalog modifications.  There are various check_*
> functions that pretty much correspond to syntax rule checks, but these
> are run after the catalog changes, hence the present issue.  Maybe we
> should have a set of "pre-check" functions in addition?
>

I chose to perform the checks in insert_*_record() functions to keep
them at a central place instead of dispersing all over like the
check_* functions. The latter need to peform their checks considering
the overall shape of the property graph, however, the specification
checks are fairly local - like duplicate property or label names
specified in the same command or duplicate labels being inserted -
they won't usually need checks across labels or elements for example.
I am afraid we might have to sprinkle pre_check_* functions at
multiple places - thus leading to a risk of missing places as this
code evolves.

Do you expect insert_element_record() to perform sanity checks of
labels or insert_label_record() to perform sanity checks on
properties? Or do you expect a hierarchy of pre_check_ functions
cascading from elements to labels to properties?

-- 
Best Wishes,
Ashutosh Bapat



Commits

  1. SQL Property Graph Queries (SQL/PGQ)