Обсуждение: returning clause and source columns

Поиск
Список
Период
Сортировка

returning clause and source columns

От
"Jack Douglas"
Дата:

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