From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Niall Smart" <niall(dot)smart(at)ebeon(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | RE: Problem with subquery in CHECK constraint. |
Date: | 2000-06-08 00:24:50 |
Message-ID: | 000901bfd0df$f57c1f20$2801007e@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> -----Original Message-----
> From: pgsql-sql-owner(at)hub(dot)org [mailto:pgsql-sql-owner(at)hub(dot)org]On Behalf
> Of Tom Lane
>
> Niall Smart <niall(dot)smart(at)ebeon(dot)com> writes:
> > However when trying to insert into CUST I get the following error:
> > ERROR: ExecEvalExpr: unknown expression type 108
> > Is this a bug in PostGreSQL?
>
> Yup. Looks like the subquery is not getting expanded into a subplan.
> Could be a little messy to fix, unless we redo the planning on every
> execution of the check constraint ... which doesn't sound appetizing.
>
There seems to be more serious problems.
1) The constraint is not only for the defined table but also for referenced
tables in the subquery.
2) There should be some standard lock mechanism for the range restricted
by the subquery.
I'm suspicious that we should/could implement constraints other than
column constraints.
Regards.
Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | Kyle Bateman | 2000-06-08 00:45:40 | References and privileges |
Previous Message | Bernie Huang | 2000-06-08 00:21:52 | Fetch an element in an array |