Re: IS OF

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: IS OF
Дата
Msg-id 3E7D081F.7000705@joeconway.com
обсуждение исходный текст
Ответ на Re: IS OF  (Gavin Sherry <swm@linuxworld.com.au>)
Ответы Re: IS OF  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: IS OF
Следующее
От: Neil Conway
Дата:
Сообщение: Re: cursors: SCROLL default, error messages