pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Michael Banck <mbanck@gmx.net>
Cc: Tommy Pavlicek <tommypav122@gmail.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@lists.postgresql.org
Cc: jian.universality@gmail.com
Subject: Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)
Date: Fri, 11 Oct 2024 12:08:24 -0400
Message-ID: <2864637.1728662904@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRBGquZK3aTYvN559FFqa=bMXEuxZZBLc6kMd671u62hTQ@mail.gmail.com>
References: <CAEhP-W_1bMTLan2LtzS+xr=b-Wep56gw+OoirABQ8b2aOw+5yg@mail.gmail.com>
	<ZTfL1G1fBPQHVPWV@msg.df7cb.de>
	<560086.1698160614@sss.pgh.pa.us>
	<ZTfjXzOKFI9AawJF@msg.df7cb.de>
	<570833.1698162135@sss.pgh.pa.us>
	<66f33840.050a0220.1f9e60.7fb9@mx.google.com>
	<ZvV1ClhnbJLCz7Sm@msg.df7cb.de>
	<325394.1727365907@sss.pgh.pa.us>
	<ZvaiS57G10dITjQm@msg.df7cb.de>
	<571930.1727454668@sss.pgh.pa.us>
	<Zvbr5zv78AfhB83S@msg.df7cb.de>
	<621972.1727459684@sss.pgh.pa.us>
	<1092841.1727552736@sss.pgh.pa.us>
	<2245576.1728418678@sss.pgh.pa.us>
	<CAFj8pRBGquZK3aTYvN559FFqa=bMXEuxZZBLc6kMd671u62hTQ@mail.gmail.com>

Pavel Stehule <pavel.stehule@gmail.com> writes:
> I tested it and it is working nicely.  I tested it against Orafce and I
> found an interesting point. The body of plpgsql functions is not checked.
> Do you know the reason?

In execute_extension_script():

    /*
     * Similarly disable check_function_bodies, to ensure that SQL functions
     * won't be parsed during creation.
     */
    if (check_function_bodies)
        (void) set_config_option("check_function_bodies", "off",
                                 PGC_USERSET, PGC_S_SESSION,
                                 GUC_ACTION_SAVE, true, 0, false);

I wondered if we should reconsider that, but I'm afraid we'd be more
likely to break working extensions than to do anything helpful.
An extension author who wants that can do what I did in the patch's
test cases: manually turn check_function_bodies on in the extension
script.

			regards, tom lane





view thread (27+ messages)  latest in thread

Message-ID: <2864637.1728662904@sss.pgh.pa.us>
Permalink:  ../2864637.1728662904@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2864637.1728662904@sss.pgh.pa.us

 · 

reply

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, pavel.stehule@gmail.com, myon@debian.org, mbanck@gmx.net, tommypav122@gmail.com, ilmari@ilmari.org, pgsql-hackers@lists.postgresql.org, jian.universality@gmail.com
  Subject: Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)
  In-Reply-To: <2864637.1728662904@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