Re: document the dangers of granting TRIGGER or REFERENCES - Mailing list pgsql-hackers

From Tom Lane
Subject Re: document the dangers of granting TRIGGER or REFERENCES
Date
Msg-id 3348034.1784053610@sss.pgh.pa.us
Whole thread
In response to Re: document the dangers of granting TRIGGER or REFERENCES  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-hackers
Greg Sabino Mullane <htamfids@gmail.com> writes:
> On Tue, Jul 14, 2026 at 11:54 AM Tom Lane <tgl@sss.pgh.pa.us> 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



pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: Proposal: QUALIFY clause
Next
From: Greg Sabino Mullane
Date:
Subject: Re: [PATCH] Use Boyer-Moore-Horspool for simple LIKE contains patterns