On Mon, 2025-06-02 at 21:19 -0400, Tom Lane wrote: > Maybe we can make a conservative approximation that's good > enough to be useful, but I'm not certain.
Right. If the alternative is reverting the feature, the idea would be to save it for at least some common use cases where the expression is obviously safe. > > I'm leaning more and more to the position that we ought to revert > virtual generated columns for v18 and give ourselves breathing > room to design a proper fix for the security hazard. Unfortunate, but I think I agree. Even if we do come up with a useful definition of "safe", it would take a while to sort through the use cases to see how much of the feature is still usable within that definition. However, I do think it's worth exploring some definition of a "safe" expression in the v19 cycle. There's significant performance overhead to wrapping the function as is done for SECURITY DEFINER, so if the function is obviously safe, it would be nice to avoid that. And it would be another tool to help us mitigate the various related problems we have with selecting from views, etc. Regards, Jeff Davis