Re: 8.0.3 regexp_replace()...

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: 8.0.3 regexp_replace()...
Дата
Msg-id 20060201074535.A87739@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: 8.0.3 regexp_replace()...  ("rlee0001" <robeddielee@hotmail.com>)
Ответы Re: 8.0.3 regexp_replace()...  ("rlee0001" <robeddielee@hotmail.com>)
Список pgsql-general
On Tue, 31 Jan 2006, rlee0001 wrote:

> I am suggesting that the behaviour of SUBSTRING returning NULL when no
> matches is found is either a bug in PostgreSQL or a flaw in the SQL
> specification. It is not logical.

No, but sadly it seems to be what the SQL spec wants for its similar
construct.

---

In general, SQL's handling of NULLs is badly designed.

Sometimes it's misused (like the substring case).

Sometimes it's confusing (like the IN and NOT IN cases).

Sometimes it's just bizarre.  If cardinality of a table expression is
important (ie, count(*) is meaningful), why is DISTINCT defined in a way
that basically does not give results consistent with NULL being unknown.
UNIQUE(q) should return NULL in the presence of NULLs rather than true,
since the real result is well, unknown (the two of these together have the
side effect of UNIQUE being true not guaranteeing that the cardinality of
a subquery and the subquery with distinct being the same).

---

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.0.3 regexp_replace()...
Следующее
От: TJ O'Donnell
Дата:
Сообщение: Re: Converting Text to Bytea