pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joe Conway <mail@joeconway.com>
Cc: Hackers (PostgreSQL) <pgsql-hackers@postgresql.org>
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)
Date: Tue, 1 Aug 2006 16:26:44 -0400
Message-ID: <20060801202644.GA19514@alvh.no-ip.org> (raw)
In-Reply-To: <16429.1154463351@sss.pgh.pa.us>
References: <44BF122F.1080200@joeconway.com>
	<23927.1153373971@sss.pgh.pa.us>
	<44C00E1E.1000405@joeconway.com>
	<14047.1153442773@sss.pgh.pa.us>
	<44C4451A.4010906@joeconway.com>
	<11495.1153757531@sss.pgh.pa.us>
	<44C4F625.2050304@joeconway.com>
	<12029.1153760969@sss.pgh.pa.us>
	<44CC0A66.6070903@joeconway.com>
	<16429.1154463351@sss.pgh.pa.us>

Tom Lane wrote:
> I've found a problem with the VALUES-as-RTE approach:
> 
> regression=# create table src(f1 int, f2 int);
> CREATE TABLE
> regression=# create table log(f1 int, f2 int, tag text);
> CREATE TABLE
> regression=# insert into src values(1,2);
> INSERT 0 1
> regression=# create rule r2 as on update to src do
> regression-# insert into log values(old.*, 'old'), (new.*, 'new');
> CREATE RULE
> regression=# update src set f2 = f2 + 1;
> server closed the connection unexpectedly

Does it work if you do

regression=# create rule r2 as on update to src do
regression-# insert into log values(old.f1, old.f2, 'old'), (new.f1, new.f2, 'new');
?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (61+ messages)  latest in thread

Message-ID: <20060801202644.GA19514@alvh.no-ip.org>
Permalink:  ../20060801202644.GA19514@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20060801202644.GA19514@alvh.no-ip.org

 · 

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: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, mail@joeconway.com, pgsql-hackers@postgresql.org
  Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)
  In-Reply-To: <20060801202644.GA19514@alvh.no-ip.org>

* 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