WIP: Triggers on VIEWs - Mailing list pgsql-hackers

From Dean Rasheed
Subject WIP: Triggers on VIEWs
Date
Msg-id AANLkTimJw47yZHnxKhMNLCFES=W-sMrqpRe7aj8YBKds@mail.gmail.com
Whole thread Raw
Responses Re: WIP: Triggers on VIEWs  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Re: WIP: Triggers on VIEWs  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
Here is a WIP patch implementing triggers on VIEWs, as outlined in the
proof-of-concept here:
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00160.php

The new triggers allowed on a VIEW are:
1). Statement-level BEFORE INSERT/UPDATE/DELETE
2). Row-level INSTEAD OF INSERT/UPDATE/DELETE
3). Statement-level AFTER INSERT/UPDATE/DELETE

The new INSTEAD OF trigger type may only be used with VIEWs, and may
only be row-level. It does not support the WHEN or FOR UPDATE OF
column_list options.

There are still a number of things left todo:
 - extend ALTER VIEW with enable/disable trigger commands
 - much more testing
 - documentation

and then there's the question of what to do about the concurrency
issues raised by Marko Tiikkaja. Currently it works like Oracle (i.e.,
no locking).

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Writeable CTEs Desgin Doc on Wiki
Next
From: Tom Lane
Date:
Subject: Re: Python 2.7 deprecated the PyCObject API?