Re: [HACKERS] IS OF - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] IS OF
Date
Msg-id 1279.1060380197@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] IS OF  (Joe Conway <mail@joeconway.com>)
Responses Re: [HACKERS] IS OF
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> OK. If the attached patch is acceptable/applied, I'll fix and resend the
> doc patch.

I'm unconvinced that the parse-time-constant implementation Lockhart
started has anything whatever to do with the semantics the SQL99 spec
has in mind.  In the first place, the spec seems to expect that the
lefthand side will actually be evaluated.  Checking for a NULL constant
doesn't cover cases where the LHS returns NULL dynamically; let alone
cases where it would cause an error.

I also get the impression that they think the result may vary at
runtime.  This is not totally impossible in Postgres, either --- you
could imagine that the LHS is a tuple from some inheritance tree, and
the IS OF query really amounts to asking which child table the tuple
came from.

Also, simple equality checks on the type OIDs don't cover the inheritance
cases (I think a child tuple should be said to be IS OF the tuple type
of its parent).  And what about domains --- should we say a domain type
IS OF its base type?

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: [HACKERS] IS OF
Next
From: Joe Conway
Date:
Subject: Re: [HACKERS] IS OF