pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Doc: note that statement-level view triggers require an INSTEAD
6+ messages / 1 participants
[nested] [flat]

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a4678320471380e5159a8d6e89466d74d6ee1739

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ff301166a9a6f23527277b89495ce56973a409f3

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7b544c4e053b93851280ee14da8e3b1049b7347c

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9fcc0baa7973eca67fae815cc5f1b62b493b3aef

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b1e48cc9c79ce9d4bd6f1297ce54089781b9f97d

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Doc: note that statement-level view triggers require an INSTEAD
@ 2018-03-18 19:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-03-18 19:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Doc: note that statement-level view triggers require an INSTEAD OF trigger.

If a view lacks an INSTEAD OF trigger, DML on it can only work by rewriting
the command into a command on the underlying base table(s).  Then we will
fire triggers attached to those table(s), not those for the view.  This
seems appropriate from a consistency standpoint, but nowhere was the
behavior explicitly documented, so let's do that.

There was some discussion of throwing an error or warning if a statement
trigger is created on a view without creating a row INSTEAD OF trigger.
But a simple implementation of that would result in dump/restore ordering
hazards.  Given that it's been like this all along, and we hadn't heard
a complaint till now, a documentation improvement seems sufficient.

Per bug #15106 from Pu Qun.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/152083391168.1215.16892140713507052796@wrigleys.postgresql.org

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/60c23ff76b1fdabd7c1adcdb00adfb11c77b04dc

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml | 13 +++++++++++++
doc/src/sgml/trigger.sgml            | 12 +++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-03-18 19:10 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>
2018-03-18 19:10 pgsql: Doc: note that statement-level view triggers require an INSTEAD Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox