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/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to