Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions

Поиск
Список
Период
Сортировка
От Roman Kononov
Тема Re: BUG #5257: wrong results of SUBSTRING with SQL regular expressions
Дата
Msg-id 4B3FC7D7.9060605@ftml.net
обсуждение исходный текст
Ответ на BUG #5257: wrong results of SUBSTRING with SQL regular expressions  ("Roman Kononov" <kononov@ftml.net>)
Список pgsql-bugs
I don't know what SQL2008 says about SUBSTRING, but SQL2003 says in
ISO/IEC 9075-2:2003 (E), 6.29 <string value function>, General Rules,
5), page 261:

d) If R [the regular expression] does not contain exactly two
occurrences of the two-character sequence consisting of E [the escape
character], each immediately followed by <double quote>, then an
exception condition is raised: data exception - invalid use of escape
character.

This means that the following is wrong:

test-std=# select substring('a' from 'a' for '#');
  substring
-----------
  a
(1 row)

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

Предыдущее
От: Tomas Studva
Дата:
Сообщение: Failed to run initdb - not resolved bug 5130
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Failed to run initdb - not resolved bug 5130