returning clause and source columns

From: "Jack Douglas" <jack(at)douglastechnology(dot)co(dot)uk>
To: <pgsql-general(at)postgresql(dot)org>
Subject: returning clause and source columns
Date: 2014-05-12 13:56:36
Message-ID: 012f01cf6de9$fdc5a5f0$f950f1d0$@douglastechnology.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Related to this post: http://dba.stackexchange.com/q/50693/1396

Would it be a major change to allow the `returning` clause of `insert` to
return values that are *not* inserted? It seems you can already do so for
literals (and perhaps that should be made explicit in the docs here:
http://www.postgresql.org/docs/9.3/static/sql-insert.html#VARIABLELIST)

For example:

insert into t1(id) select id from t2 returning *, t2.foo;

Kindest regards

Jack

Browse pgsql-general by date

  From Date Subject
Next Message Souquieres Adam 2014-05-12 14:05:23 Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory
Previous Message Souquieres Adam 2014-05-12 13:43:12 Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory