Re: [SQL] POSIX-style regular expressions

2002-09-10 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Tue, 10 Sep 2002, Goran Buzic wrote: >> id1char(6) NOT NULL CHECK(id1 ~* '^([0-9]{1,2}\.){2}$'), > Bad column type choice. char(6) is space padded, so 1.2. looks like > "1.2. ". For me, 12.12. works, but any shorter one fails. Unless > you ne

Re: [SQL] POSIX-style regular expressions

2002-09-10 Thread Ross J. Reedstrom
On Tue, Sep 10, 2002 at 08:35:27AM -0500, Josh Jore wrote: > On Tue, 10 Sep 2002, Goran Buzic wrote: > > > id1char(6) NOT NULL CHECK(id1 ~* '^([0-9]{1,2}\.){2}$'), > > > ERROR:ExecAppend: rejected due to CHECK constraint table_name1_id1 > > > > I tested preceding regular expression w

Re: [SQL] POSIX-style regular expressions

2002-09-10 Thread Stephan Szabo
On Tue, 10 Sep 2002, Goran Buzic wrote: > Hi > > Can anybody help me with POSIX-style regular expression used to check rules > that new data must satisfy for an insert or update operetion. > > Table was created as follows. > > CREATE TABLE table_name1 ( > id1char(6) NOT NULL CHECK(id1 ~*

Re: [SQL] POSIX-style regular expressions

2002-09-10 Thread Josh Jore
On Tue, 10 Sep 2002, Goran Buzic wrote: > id1char(6) NOT NULL CHECK(id1 ~* '^([0-9]{1,2}\.){2}$'), > ERROR:ExecAppend: rejected due to CHECK constraint table_name1_id1 > > I tested preceding regular expression with Perl and JavaScript and it worked > fine. Can I use regular expressio

[SQL] POSIX-style regular expressions

2002-09-10 Thread Goran Buzic
Hi Can anybody help me with POSIX-style regular expression used to check rules that new data must satisfy for an insert or update operetion. Table was created as follows. CREATE TABLE table_name1 ( id1char(6) NOT NULL CHECK(id1 ~* '^([0-9]{1,2}\.){2}$'), id2INT NOT NULL, CON