Re: [HACKERS] A small problem with the new inet and cidr typesg

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: [HACKERS] A small problem with the new inet and cidr typesg
Дата
Msg-id m0zah6U-0000eRC@druid.net
обсуждение исходный текст
Ответы Re: [HACKERS] A small problem with the new inet and cidr typesg
Список pgsql-hackers
Thus spake Jan Wieck
> D'Arcy J.M. Cain wrote:
> > There may be cases where a function of a null is not null as some people
> > have pointed out but so far no one has come up with a practical example.
> 
>     CREATE FUNCTION cnt_t1_b(text) RETURNS int4 AS
>         'SELECT count(*) FROM t1 WHERE b = $1'
>         LANGUAGE 'sql';
> 
>     BTW:  It does not work with NULL argument currently, but IMHO
>     it should count the number of rows where b is NULL.

Well, this is the first example that I have seen that wouldn't work
unless a function with a null argument actually called the function but
you do realize that this wouldn't work anyway, right?  The following
is a parse error.
   SELECT count(*) FROM t1 WHERE b = null;

Mind you, I think that's a weakness but I don't know what the issues
are with respect to the code or the standard.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.


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

Предыдущее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: Re: [HACKERS] A small problem with the new inet and cidr types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] A small problem with the new inet and cidr types