Re: POSIX-style regular expressions

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Goran Buzic <goran(dot)buzic(at)hep(dot)hr>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: POSIX-style regular expressions
Date: 2002-09-10 15:04:14
Message-ID: 20020910080224.L24403-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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 (
> id1 char(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 need space padding elsewhere, you may just want to use varchar(6);

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ross J. Reedstrom 2002-09-10 15:13:39 Re: POSIX-style regular expressions
Previous Message Ross J. Reedstrom 2002-09-10 14:49:08 Re: stored procedures: sybase -> postgreSQL ?