Re: Can't use subselect in check constraint

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ian Harding <ianh(at)tpchd(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Can't use subselect in check constraint
Date: 2001-12-20 21:54:52
Message-ID: 200112202154.fBKLsq724811@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> On Wed, 19 Dec 2001, Tom Lane wrote:
>
> > "Ian Harding" <ianh(at)tpchd(dot)org> writes:
> > > Is this something that will change anytime soon?
> >
> > It's not high-priority in my mind. The difficulty is the lack of a
> > planning step for constraint expressions. Maybe we could fix this
> > when we redesign querytrees; right now I think there's too much cruft
> > in the way (memory leaks, state kept in the querytree, etc etc)
>
> Also, AFAICS, check constraints with subselects are constraints on the
> other tables named in the subselect as well and it could be on a
> case which the current check constraints don't fire (for example
> on delete from a table where a set value function is used, like
> check (select count(*) from foo)>col1) or something like that).

It this a TODO item.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-12-20 22:00:57 Re: TOAST performance (was Re: [GENERAL] Delete Performance)
Previous Message Gregory Wood 2001-12-20 21:46:29 Re: Can't use subselect in check constraint