> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Tom Lane
>
> Niall Smart <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
- [SQL] Problem with subquery in CHECK constraint. Niall Smart
- Re: [SQL] Problem with subquery in CHECK constraint. Tom Lane
- Re: [SQL] Problem with subquery in CHECK constraint... Hiroshi Inoue
- Re: [SQL] Problem with subquery in CHECK constr... Niall Smart
- RE: [SQL] Problem with subquery in CHECK co... Hiroshi Inoue
- Re: [SQL] Problem with subquery in CHE... Niall Smart
- Re: [SQL] Problem with subquery in CHECK co... Stephan Szabo