pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@seespotcode.net>
To: Joe Conway <mail@joeconway.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hackers (PostgreSQL) <pgsql-hackers@postgresql.org>
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Date: Wed, 2 Aug 2006 15:54:00 +0900
Message-ID: <1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net> (raw)
In-Reply-To: <44D0205E.9060300@joeconway.com>
References: <200608020314.k723EbQ01079@momjian.us>
	<44D0205E.9060300@joeconway.com>

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




view thread (61+ messages)  latest in thread

Message-ID: <1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net>
Permalink:  ../1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net/
Also on:    postgresql.org/message-id/1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: grzm@seespotcode.net, mail@joeconway.com, bruce@momjian.us, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
  In-Reply-To: <1CD9D95B-E824-4A0D-85BB-279AD06B931C@seespotcode.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox