Re: [HACKERS] IS OF

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] IS OF
Date: 2003-08-08 22:03:17
Message-ID: 1279.1060380197@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2003-08-08 22:10:06 Re: Correlation in cost_index()
Previous Message Joe Conway 2003-08-08 21:49:27 Re: [HACKERS] IS OF

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2003-08-08 22:26:30 Re: [HACKERS] IS OF
Previous Message Joe Conway 2003-08-08 21:49:27 Re: [HACKERS] IS OF