Re: Vertex/Edge label and view

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vertex/Edge label and view
Date: 2026-08-25 13:52:08
Message-ID: 9dba9d26-25a9-4b06-bb03-3c58b668d5f0@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.08.26 15:18, Peter Eisentraut wrote:
> On 07.08.26 08:47, Ashutosh Bapat wrote:
>> Otherwise, standard needs to define the result of the query when a
>> label exists but is not associated with any element of required type -
>> which essentially would mean returning 0 rows since there are no
>> elements associated with the label.
>>
>> I think we need the standard to define the behaviour in such a case.
>
> The standard does define that behavior: Using a label that is not
> associated with an element of the right type is a syntax error.
>
> What we are not doing correctly is that DROP LABEL should either
> RESTRICT if a view exists or CASCADE, as appropriate.
>
> So there is room for improvement, but I'm not too bothered by the
> current behavior.  You get a clear error message and nothing incorrect
> happens.

I have committed the test case you had proposed.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-08-25 13:59:03 Re: Tracking per-RelOptInfo uniqueness during planning
Previous Message Pierre Forstmann 2026-08-25 13:51:53 Re: [PATCH] Remove obsolete tupDesc assignment in extended statistics