Greg Sabino Mullane <[email protected]> writes:
> On Tue, Jul 14, 2026 at 11:54 AM Tom Lane <[email protected]> wrote:
>> REFERENCES is required by SQL spec, no?
> Makes me wonder if other database systems suffer from the same issue?
I think a strict-SQL-spec database is probably insulated from the
arbitrary-code-execution problem, because there isn't any way to get
user-defined code involved in executing comparisons. For real-world
systems, you'd have to take a close look at what datatype extension
capabilities they've added.
Of course, a holder of REFERENCES can still block updates and deletes
on your table, so it's not like it's something you'd give out to
untrusted roles anyway. (I wonder if Robert's proposed patch should
be extended to point that out. It's obvious, but so is the issue
with TRIGGER.)
regards, tom lane