On Wed, 2023-03-01 at 16:06 -0500, Robert Haas wrote: > To be fair, it's possible that there's no solution to this class of > problems that *doesn't* suck, but I think we should look a lot harder > before coming to that conclusion.
Fair enough. The situation is bad enough that I'm willing to consider a pretty wide range of solutions and mitigations that might otherwise be unappealing. I think there might be something promising in your idea to highly restrict the privileges of code attached to a table. A lot of expressions are really simple and don't need much to be both useful and safe. We may not need the exact same solution for both default expressions and triggers. Some details to work through, though. Regards, Jeff Davis