Feature request: support queries with returning on simple views with automatic update

From: Attila Soki <atiware(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Feature request: support queries with returning on simple views with automatic update
Date: 2013-10-10 13:40:13
Message-ID: 5E9AA760-007F-44E5-838E-F8E70E01800C@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi all,

the automatic update for views is really a helpful feature, but i think it would be more useful with returning support.

currently we have to construct a rule/trigger to support queries like
'insert into simple_view returning pk'

is it possible (or desired) to implement something like an automatic returning support?
it would be great if i could simply write 'insert into simple_view returning col1' or 'insert into simple_view returning col2' and postgres would make the magic behind.

(a slightly changed text from the pg rules documentation)
The RETURNING logic of the automatic update feature would be used only if the automatic update is triggered by an INSERT RETURNING, UPDATE RETURNING, or DELETE RETURNING command respectively. When the automatic update is triggered by a command without RETURNING, the RETURNING logic will be ignored.

thanks

regards,
Attila

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-10-10 13:48:03 Re: Re: [GENERAL] Forms for entering data into postgresql
Previous Message Kevin Grittner 2013-10-10 13:23:37 Re: [HACKERS] Urgent Help Required