Search Postgresql Archives

regular expression limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux