On 25 February 2013 19:52, Russell Keane <Russell(dot)Keane(at)inps(dot)co(dot)uk> wrote:
> Hi,
>
>
>
> We have a table which is inserted to and update via a view (using rules /
> functions).
>
In PG 9.1 and later, the recommended way to do this is using INSTEAD
OF triggers on the view.
See the "Notes" section here:
http://www.postgresql.org/docs/current/static/sql-createview.html
and the example here:
http://www.postgresql.org/docs/current/static/plpgsql-trigger.html#PLPGSQL-VIEW-TRIGGER-AUDIT-EXAMPLE
Regards,
Dean