Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them
Date
Msg-id CAEze2Wh9eOHQ2qf3qhftW0muLYBED7U41X1GUOYyJMrsSw4PNw@mail.gmail.com
Whole thread Raw
In response to Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 29 May 2025 at 20:30, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
> > On Thu, 29 May 2025 at 15:44, Robert Haas <robertmhaas@gmail.com> wrote:
> >> But so far - apart from this feature - we
> >> have managed to avoid making it categorically unsafe for the superuser
> >> to run "SELECT * FROM table"
>
> > With CREATE RULE [0], a table owner can redefine what happens during
> > e.g. SELECT * FROM table.
>
> That's a view, not a table.

Ah, it's hidden deeper into the docs than I'd first read, but indeed
ON SELECT is only allowed for views. The syntax itself nor the 'event'
description in the parameters detail this restriction, which is where
I looked.

Sorry for the noise, and thank you for correcting me.

Kind regards,

Matthias van de Meent
Neon (https://neon.tech)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them
Next
From: Sami Imseih
Date:
Subject: Re: track generic and custom plans in pg_stat_statements