agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Check/unique constraint question
Date: Sun, 5 Mar 2006 11:29:42 +0100
Message-ID: <20060305102942.GA7051@merkur.hilbert.loc> (raw)
In-Reply-To: <e431ff4c0603050102m36b68e08w9d84e52e1f8701cb@mail.gmail.com>
References: <Pine.LNX.4.64.0603050015050.29717@discord.dyndns.org>
<e431ff4c0603050102m36b68e08w9d84e52e1f8701cb@mail.gmail.com>
On Sun, Mar 05, 2006 at 12:02:58PM +0300, Nikolay Samokhvalov wrote:
> Unfortunately, at the moment Postgres doesn't support subqueries in
> CHECK constraints, so it's seems that you should use trigger to check
> what you need
The OP could also use a check constraint with a function if
everything (the context) but the value to check is known
beforehand or can be derived from it.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
view thread (11+ messages) latest in thread
Message-ID: <20060305102942.GA7051@merkur.hilbert.loc>
Permalink: ../20060305102942.GA7051@merkur.hilbert.loc/
Also on: postgresql.org/message-id/20060305102942.GA7051@merkur.hilbert.loc
reply
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: Karsten.Hilbert@gmx.net
Subject: Re: Check/unique constraint question
In-Reply-To: <20060305102942.GA7051@merkur.hilbert.loc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox