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

From Christoph Berg
Subject Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them
Date
Msg-id aEG_5yD8Auc3bppU@msg.df7cb.de
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
Re: Tom Lane
> > Extending the idea, perhaps the check could be moved to run-time and
> > recursively check that only immutable functions are called, including
> > user-defined immutable functions?
> 
> I don't think I'd trust that.  UDFs can claim to be immutable but
> be lying about it.

That's why I said "recursively". Then truly immutable user-defined
functions could still be used.

But practically, people will probably want to select from other tables
anyway (I've already had to tell a customer that virtual columns do
not allow that), so the use-case for user immutable functions is
probably very thin.

Christoph



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Possibly hard-to-read message
Next
From: Andres Freund
Date:
Subject: Re: postmaster uses more CPU in 18 beta1 with io_method=io_uring