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.