From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL-standard function body
Date: Wed, 1 Jul 2020 11:42:25 -0400
Message-ID: <20200701154225.GD5186@momjian.us> (raw)
In-Reply-To: <582467.1593612850@sss.pgh.pa.us>
References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com>
<CA+TgmoZ-FXU0iyevFETN0sGYw0RKTSCFxKONGE+2nVJEM5_8OQ@mail.gmail.com>
<493812.1593541480@sss.pgh.pa.us>
<494838.1593543098@sss.pgh.pa.us>
<CA+Tgmoah=cK3QCCXkKcd89SjGhza9PibOWepEC=Oo8GB_V9DDw@mail.gmail.com>
<582467.1593612850@sss.pgh.pa.us>
On Wed, Jul 1, 2020 at 10:14:10AM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > In my experience, there's certainly demand for some kind of mode where
> > plpgsql functions get checked at function definition time, rather than
> > at execution time.
>
> Yeah, absolutely agreed. But I'm afraid this proposal takes us too
> far in the other direction: with this, you *must* have a 100% parseable
> and semantically valid function body, every time all the time.
>
> So far as plpgsql is concerned, I could see extending the validator
> to run parse analysis (not just raw parsing) on all SQL statements in
> the body. This wouldn't happen of course with check_function_bodies off,
> so it wouldn't affect dump/reload. But likely there would still be
> demand for more fine-grained control over it ... or maybe it could
> stop doing analysis as soon as it finds a DDL command?
Is the SQL-standard function body verified as preventing function
inlining? That seems to be a major downside.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, peter.eisentraut@2ndquadrant.com
Subject: Re: SQL-standard function body
In-Reply-To: <20200701154225.GD5186@momjian.us>
References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com> <CA+TgmoZ-FXU0iyevFETN0sGYw0RKTSCFxKONGE+2nVJEM5_8OQ@mail.gmail.com> <493812.1593541480@sss.pgh.pa.us> <494838.1593543098@sss.pgh.pa.us> <CA+Tgmoah=cK3QCCXkKcd89SjGhza9PibOWepEC=Oo8GB_V9DDw@mail.gmail.com> <582467.1593612850@sss.pgh.pa.us> <20200701154225.GD5186@momjian.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