Re: IS OF

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IS OF
Date: 2003-05-26 02:25:37
Message-ID: 200305260225.h4Q2Pbe25108@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Can someone suggest where to document IS OF, and either document it's
non-standard behavior or supply patch?

---------------------------------------------------------------------------

Joe Conway wrote:
> Gavin Sherry wrote:
> >
> > 8.14 <type predicate> to be exact.
> >
>
> 8.18 in SQL200x. I don't think the current implementation quite meets
> the spec however:
>
> regression=# select f2 is null, f2 is of(int) from bar;
> ?column? | ?column?
> ----------+----------
> f | t
> t | t
> (2 rows)
>
> If I read the spec correctly, the null value should return null, not 't'
> in the above.
>
> General Rules
> 1) Let V be the result of evaluating the <row value predicand>.
> 2) Let ST be the set consisting of every type that is either some
> exclusively specified type, or a subtype of some inclusively
> specified type.
> 3) Let TPR be the result of evaluating the <type predicate>.
>
> Case:
> a) If V is the null value, then TPR is Unknown.
> b) If the most specific type of V is a member of ST, then TPR is True .
> c) Otherwise, TPR is False
>
> Probably best not to document it until someone gets around to fixing it
> -- I can do it, but not for the next few weeks at least.
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

  • Re: IS OF at 2003-03-23 01:04:31 from Joe Conway

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-05-26 02:35:57 Re: Domain breakage
Previous Message Tom Lane 2003-05-26 01:03:04 Re: vacuum analyze corrupts database

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-05-26 05:01:07 Re: Adding Rendezvous support to postmaster
Previous Message Bruce Momjian 2003-05-26 00:45:26 Re: cleanup of cbrt() handling