Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Berg <myon(at)debian(dot)org>, Michael Banck <mbanck(at)gmx(dot)net>, Tommy Pavlicek <tommypav122(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org, jian(dot)universality(at)gmail(dot)com
Subject: Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)
Date: 2024-10-11 17:39:37
Message-ID: CAFj8pRCF2-ObuMHV5sxQbq9sZ+hCv5mV5SUToD8=9Qw8tZ7DgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pá 11. 10. 2024 v 18:08 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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.
>

ok,

Pavel

>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-10-11 18:15:46 Re: Add contrib/pg_logicalsnapinspect
Previous Message Bertrand Drouvot 2024-10-11 17:12:34 Re: Track the amount of time waiting due to cost_delay