From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: Converting contrib SQL functions to new style
Date: Tue, 13 Apr 2021 23:11:13 -0400
Message-ID: <3441172.1618369873@sss.pgh.pa.us> (raw)
In-Reply-To: <20210414020827.GA1232417@rfd.leadboat.com>
References: <3395418.1618352794@sss.pgh.pa.us>
<20210414020827.GA1232417@rfd.leadboat.com>
Noah Misch <noah@leadboat.com> writes:
> On Tue, Apr 13, 2021 at 06:26:34PM -0400, Tom Lane wrote:
>> Attached are some draft patches to convert almost all of the
>> contrib modules' SQL functions to use SQL-standard function bodies.
>> The point of this is to remove the residual search_path security
>> hazards that we couldn't fix in commits 7eeb1d986 et al. Since
>> a SQL-style function body is fully parsed at creation time,
>> its object references are not subject to capture by the run-time
>> search path.
> Are there any inexact matches in those function/operator calls? Will that
> matter more or less than it does today?
I can't claim to have looked closely for inexact matches. It should
matter less than today, since there's a hazard only during creation
(with a somewhat-controlled search path) and not during use. But
that doesn't automatically eliminate the issue.
>> I'd like to propose squeezing these changes into v14, even though
>> we're past feature freeze. Reason one is that this is less a
>> new feature than a security fix; reason two is that this provides
>> some non-artificial test coverage for the SQL-function-body feature.
> Dogfooding like this is good. What about the SQL-language functions that
> initdb creates?
Hadn't thought about those, but converting them seems like a good idea.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, peter.eisentraut@enterprisedb.com
Subject: Re: Converting contrib SQL functions to new style
In-Reply-To: <3441172.1618369873@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox