From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | 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-03-23 01:04:31 |
Message-ID: | 3E7D081F.7000705@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2003-03-23 01:23:22 | Re: cursors: SCROLL default, error messages |
Previous Message | Gavin Sherry | 2003-03-23 00:42:46 | Re: IS OF |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Brown | 2003-03-23 23:30:04 | Re: SQL99 ARRAY support proposal |
Previous Message | Gavin Sherry | 2003-03-23 00:42:46 | Re: IS OF |