From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ari Entlich <atrigent@ccs.neu.edu>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6612: Functions can be called inside CHECK statements
Date: Wed, 25 Apr 2012 23:59:24 -0400
Message-ID: <22338.1335412764@sss.pgh.pa.us> (raw)
In-Reply-To: <3125270.869581335385510960.JavaMail.root@zimbra>
References: <3125270.869581335385510960.JavaMail.root@zimbra>
Ari Entlich <atrigent@ccs.neu.edu> writes:
> I do, however, think it should definitely be documented somewhere that functions cannot be used to get around the lack of check statement subqueries, because the ordering of operations is wrong.
That statement seems to me to be complete nonsense. You can certainly
put a query into a function invoked by CHECK. It may be that there's
some particular use-case that this doesn't work for, but that does not
justify a blanket statement that it "doesn't work".
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, atrigent@ccs.neu.edu
Subject: Re: BUG #6612: Functions can be called inside CHECK statements
In-Reply-To: <22338.1335412764@sss.pgh.pa.us>
References: <3125270.869581335385510960.JavaMail.root@zimbra> <22338.1335412764@sss.pgh.pa.us>
* 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