[go: up one dir, main page]

Re: Subqueries in Check() -- Still Intentionally Omitted?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Subqueries in Check() -- Still Intentionally Omitted?
Date: 2008-09-03 00:26:04
Message-ID: 8893.1220401564@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Tue, 2008-09-02 at 19:22 -0400, Tom Lane wrote:
>> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
>>> My question is not why don't we allow subqueries in CHECK, my question
>>> is why do we allow stable/volatile functions?
>>
>> Historically we've allowed it,

> I suppose this means that we're already treating any CHECK constraint as
> immutable anyway, e.g. for constraint_exclusion?

I think the constraint_exclusion code does check for immutability before
assuming it can deduce exclusion. But the ordinary use of CHECK just
assumes it only needs to evaluate the check at tuple insertion.

regards, tom lane

In response to Browse pgsql-general by date
  From Date Subject
Next Message aderose 2008-09-03 00:37:37 vacuum analyze hurts performance
Previous Message Richard Broersma 2008-09-03 00:07:14 Re: Subqueries in Check() -- Still Intentionally Omitted?