Triggers on underlying tables of updatable views

2021-11-22 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/sql-createview.html Description: Hi all, I'm using an updatable view with an underlying table. The underlying table has a trigger attached to it that performs a select statement on the un

Re: Triggers on underlying tables of updatable views

2021-11-22 Thread Laurenz Albe
On Mon, 2021-11-22 at 12:06 +, PG Doc comments form wrote: > "Note that the user performing the insert, update or delete on the view must > have the corresponding insert, update or delete privilege on the view. In > addition the view's owner must have the relevant privileges on the > underlying

Re: Triggers on underlying tables of updatable views

2021-11-22 Thread Laurenz Albe
On Mon, 2021-11-22 at 19:54 +0100, Max Ziermann wrote: > Am 22.11.21 um 16:41 schrieb Laurenz Albe: > > On Mon, 2021-11-22 at 12:06 +, PG Doc comments form wrote: > > > "Note that the user performing the insert, update or delete on the view > > > must > > > have the corresponding insert, updat

ORDER BY in materialized view example?

2021-11-22 Thread Maciek Sakrejda
An example in the materialized view documentation [1] includes an ORDER BY clause without a clear reason. Does it help build the index more efficiently? I suppose it's also sort of like a CLUSTER? But it seems like the ORDER BY should either be explained or dropped: as is, this gives the impressio

max_slot_wal_keep_size unit is not specified

2021-11-22 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/runtime-config-replication.html Description: The unit (I assume it's MB) of max_slot_wal_keep_size is not explicitly specified in the docs. If it's intentional then please, disregards, but

Re: Triggers on underlying tables of updatable views

2021-11-22 Thread Max Ziermann
Thanks for your reply. Maybe I am missing an obvious point, but I don't think that's the case. SQL example: CREATE ROLE view_access; CREATE TABLE data (a integer primary key); CREATE VIEW data_view AS SELECT * FROM data; GRANT SELECT, INSERT ON data_view TO view_access; CREATE FUNCTION trig() R