Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-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


pgsql-hackers by date

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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group