Re: [SQL] Nonexistent NEW relation in some places of rules

2003-07-30 Thread Denis Zaitsev
On Tue, Jul 29, 2003 at 06:32:44PM -0400, Tom Lane wrote: > The problem is that the rule gets expanded into something rather like > > insert into a select ... from new, produce(new.b); > > and we can't support that. If we ever add support for SQL99's > LATERAL(), it might help improve matt

Re: [SQL] Nonexistent NEW relation in some places of rules

2003-07-29 Thread Tom Lane
Denis Zaitsev <[EMAIL PROTECTED]> writes: > create rule b as > on insert to b do instead > insert into a > select * from produce (new.b); > ERROR: Relation "*NEW*" does not exist > So, what is wrong in using NEW right from the FROM? CVS tip gives a possibly more helpful error message