From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Goran Buzic <goran.buzic@hep.hr>
Cc: pgsql-sql@postgresql.org
Subject: Re: POSIX-style regular expressions
Date: Tue, 10 Sep 2002 08:04:14 -0700 (PDT)
Message-ID: <20020910080224.L24403-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <alkea9$104o$1@news.hub.org>
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);
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, goran.buzic@hep.hr
Subject: Re: POSIX-style regular expressions
In-Reply-To: <20020910080224.L24403-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox