Re: Strange permission effect depending on DEFERRABILITY

2024-09-10 Thread Achilleas Mantzios
Στις 10/9/24 20:22, ο/η Laurenz Albe έγραψε: On Tue, 2024-09-10 at 12:20 +0300, Achilleas Mantzios - cloud wrote: On 9/10/24 00:09, Laurenz Albe wrote: On Mon, 2024-09-09 at 16:14 +0300, Achilleas Mantzios - cloud wrote: The below runs on PostgreSQL 16.4 We are trying to implement a certain o

Re: Strange permission effect depending on DEFERRABILITY

2024-09-10 Thread Laurenz Albe
On Tue, 2024-09-10 at 12:20 +0300, Achilleas Mantzios - cloud wrote: > On 9/10/24 00:09, Laurenz Albe wrote: > > On Mon, 2024-09-09 at 16:14 +0300, Achilleas Mantzios - cloud wrote: > > > The below runs on PostgreSQL 16.4 > > > > > > We are trying to implement a certain operation based on a securi

Re: Strange permission effect depending on DEFERRABILITY

2024-09-10 Thread Achilleas Mantzios - cloud
On 9/10/24 00:09, Laurenz Albe wrote: On Mon, 2024-09-09 at 16:14 +0300, Achilleas Mantzios - cloud wrote: The below runs on PostgreSQL 16.4 We are trying to implement a certain operation based on a security definer function : mariner_update_availability_date This is supposed to update a tab

Re: Strange permission effect depending on DEFERRABILITY

2024-09-09 Thread Laurenz Albe
On Mon, 2024-09-09 at 16:14 +0300, Achilleas Mantzios - cloud wrote: > The below runs on PostgreSQL 16.4 > > We are trying to implement a certain operation based on a security definer > function : mariner_update_availability_date > > This is supposed to update a table : mariner , which has severa

Re: Strange permission effect depending on DEFERRABILITY

2024-09-09 Thread Achilleas Mantzios - cloud
On 9/9/24 17:21, Tom Lane wrote: Achilleas Mantzios - cloud writes: As you noticed the last trigger is a CONSTRAINT DEFERRABLE trigger. This function mariner_update_availability_date is supposed to be run by a user : cbt_results_import strippedof any privileges to the rest of the system. Here

Re: Strange permission effect depending on DEFERRABILITY

2024-09-09 Thread Tom Lane
Achilleas Mantzios - cloud writes: > As you noticed the last trigger is a CONSTRAINT DEFERRABLE trigger. This > function mariner_update_availability_date is supposed to be run by a > user : cbt_results_import strippedof any privileges to the rest of the > system. Here is what we get : when we S