Re: Bug#347548: DOMAIN CHECK constraint bypassed - Mailing list pgsql-bugs

From Neil Conway
Subject Re: Bug#347548: DOMAIN CHECK constraint bypassed
Date
Msg-id 1138660844.8835.11.camel@localhost.localdomain
Whole thread Raw
In response to Re: Bug#347548: DOMAIN CHECK constraint bypassed  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Bug#347548: DOMAIN CHECK constraint bypassed
List pgsql-bugs
On Sat, 2006-01-28 at 20:17 +0100, Peter Eisentraut wrote:
> This bug was reported to Debian.  Comments?

AFAICS I fixed this a few weeks ago (post-8.1.2):

http://archives.postgresql.org/pgsql-committers/2006-01/msg00209.php
http://archives.postgresql.org/pgsql-patches/2006-01/msg00139.php

I get the following results with the test script on REL8_1_STABLE:

Insert string was allowed, OK
DBD::Pg::db do failed: ERROR:  value for domain absdirpath violates
check constraint "absdirpath_check"
Insert empty string was disallowed, OK
DBD::Pg::st execute failed: ERROR:  value for domain absdirpath violates
check constraint "absdirpath_check"
Insert empty string via bind was disallowed, OK
DBD::Pg::st execute failed: ERROR:  null value in column "basedir"
violates not-null constraint
Insert NULL via bind was disallowed, OK

(FWIW I certainly agree with Tom that the domain implementation needs a
fair bit of work.)

-Neil

pgsql-bugs by date:

Previous
From: David Fetter
Date:
Subject: Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...
Next
From: "Jim C. Nasby"
Date:
Subject: Re: BUG #2223: Misleading info in docs on volatility level of functions