Re: [HACKERS] CHECK constraints inconsistencies

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] CHECK constraints inconsistencies
Date: 2004-03-02 01:28:02
Message-ID: 26697.1078190882@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Michael Glaesemann <grzm(at)myrealbox(dot)com> writes:
> In both cases, the CHECK constraint uses a function that is stable or
> volatile. It was suggested that functions used in CHECK constraints be
> restricted to immutable,

This seems reasonable to me. I'm a bit surprised we do not have such a
check already.

Of course, a user could easily get into the sort of situation you
describe anyway, just by lying about the volatility labeling of a
user-defined function. But at least we could say it was his fault
then ;-)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2004-03-02 01:43:59 Re: [HACKERS] CHECK constraints inconsistencies
Previous Message Michael Glaesemann 2004-03-02 00:53:40 CHECK constraints inconsistencies

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-03-02 01:30:39 Re: Avoid MVCC using exclusive lock possible?
Previous Message Tom Lane 2004-03-02 01:22:37 Re: Tablespaces