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

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Wrong query result w/ propgraph single lateral col reference
Date: 2026-07-08 13:29:33
Message-ID: CAExHW5tqKgVxNP7ecQUXRnDwFpKFCa1MdkQCrFEfi91rzQBS9g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 8, 2026 at 2:35 PM Peter Eisentraut <peter(at)eisentraut(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-07-08 13:30:58 Re: allow spread checkpoints when changing checksums online
Previous Message David Rowley 2026-07-08 13:20:43 Re: Add bms_offset_members() function for bitshifting Bitmapsets