Re: Problem with subquery in CHECK constraint. - Mailing list pgsql-sql

From Niall Smart
Subject Re: Problem with subquery in CHECK constraint.
Date
Msg-id 393F8A00.1D2D4AB5@ebeon.com
Whole thread Raw
In response to RE: Problem with subquery in CHECK constraint.  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses RE: Problem with subquery in CHECK constraint.
List pgsql-sql
CONSTRAINT TYPE_CD_OK CHECK (EXISTS (SELECT 1 FROM XREF WHERE         XREF_GROUP = 'CUST_TYPE' AND        XREF_CD =
TYPE_CD)
)


> There seems to be more serious problems.
> 1) The constraint is not only for the defined table but also for referenced
>     tables in the subquery.

I don't understand what you mean -- the constraint only
constrains 1 column in one table...

> 2) There should be some standard lock mechanism for the range restricted
>     by the subquery.
> 
> I'm suspicious that we should/could implement constraints other than
> column constraints.

Again, I don't fully understand what you're saying; but I
have successfully implemented the constraint using a user
defined function.

Niall


pgsql-sql by date:

Previous
From: "omid omoomi"
Date:
Subject: Re: Fetch an element in an array
Next
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: