Re: proposed todo: use insert/update returning anywhere a table is allowed

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposed todo: use insert/update returning anywhere a table is allowed
Date: 2007-02-06 22:25:29
Message-ID: 1170800729.10824.22.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2007-02-06 at 16:54 -0500, Merlin Moncure wrote:
> It would be great to be able to join to update, returning, etc. It
> looks like the code was deliberately tied off as-is and I was
> surprised not to see a todo for this.
>
> the basic idea is to be able to do things like:
> select * from (update foo set id = 1 returning *) q;
>
> which currently syntax errors out on 'set' which is a bit odd.
>
> here are tom's brief notes on it and also some context on how select
> combined with insert/update might influence triggers:
>
> http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php
>

Also a relevent thread:

http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2007-02-06 22:43:46 Proposal: TABLE functions
Previous Message Tom Lane 2007-02-06 21:57:47 Re: Status of autovacuum and the sporadic stats failures ?