regular expression limit

Поиск
Список
Период
Сортировка
От Ron Peterson
Тема regular expression limit
Дата
Msg-id 20070102035259.GB15601@yellowbank.com
обсуждение исходный текст
Ответы Re: regular expression limit  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I believe there's been a change in PostgreSQL's regular expression
handling w/ 8.2.

CREATE TABLE testb (
  name
    TEXT
--    CHECK( name ~ '^[a-f0-9]{1,256}$' )
    CHECK( name ~ '^[a-f0-9]{1,255}$' )
);

If I swap the two check statements above, I can no longer insert data.
The operation errors out with:

"invalid regular expression: invalid repetition count(s)"

I'd like the following domain statement to work.  It used to work in
8.1.4, but not now.  Can I do this in 8.2?

CREATE DOMAIN
  __hex_string_8192
AS TEXT
CHECK ( VALUE ~ '^[a-f0-9]{1,8192}$' );

TIA.

--
Ron Peterson
https://www.yellowbank.com/

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

Предыдущее
От: novnov
Дата:
Сообщение: Re: Installing support for python on windows
Следующее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: spooky refusal to insert