Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] - Mailing list pgsql-hackers

From Michael Glaesemann
Subject Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Date
Msg-id 1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net
Whole thread Raw
In response to Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Joe Conway <mail@joeconway.com>)
Responses Re: Values list-of-targetlists patch for comments (was Re:
List pgsql-hackers
On Aug 2, 2006, at 12:47 , Joe Conway wrote:


> regression=# create rule r2 as on update to src do insert into log
> values(old.*, 'old'), (new.*, 'new');
> ERROR:  VALUES must not contain OLD or NEW references
>

Would it make sense to add a HINT as well, recommending the UNION  
construct Tom mentioned earlier?

On Aug 2, 2006, at 11:52 , Tom Lane wrote:

> create rule r2 as on update to src do
>     insert into log select old.*, 'old' union all new.*, 'new';
>
> or just use two separate INSERT commands in the rule.
>

Or is the general case too, uh, general for a HINT?

Michael Glaesemann
grzm seespotcode net



pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: pg_dump dumping entire system catalogs
Next
From: "Adrian Maier"
Date:
Subject: Re: float8 regression failure (HEAD, cygwin)