Re: CREATE FUNCTION .. SET vs. pg_dump

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE FUNCTION .. SET vs. pg_dump
Date: 2013-09-03 16:57:52
Message-ID: 52261510.8070907@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/03/2013 06:15 PM, Robert Haas wrote:
> On Sun, Sep 1, 2013 at 10:36 AM, Stefan Kaltenbrunner
> <stefan(at)kaltenbrunner(dot)cc> wrote:
>>> It would seem that a simple solution would be to add an elevel argument
>>> to ProcessGUCArray and then call it with NOTICE in the case that
>>> check_function_bodies is true. None of the contrib modules call
>>> ProcessGUCArray, but should we worry that some external module does?
>>
>> attached is a rough patch that does exactly that, if we are worried
>> about an api change we could simple do a ProcessGUCArrayNotice() in the
>> backbranches if that approach is actually sane.
>
> This patch has some definite coding-style issues, but those should be
> easy to fix. The bigger thing I worry about is whether distributing
> the decision as to what elevel ought to be used here all over the code
> base is indeed sane. Perhaps that ship has already sailed, though.

I can certainly fix the coding style thing up - but it was declared as
"rough" mostly because I'm not entirely sure the way this is going is
actually the right way to attack this...

This whole stuff seems to be a bit messy and bolted on in some ways.
There is ProcessGUCArray(), but also set_config_option() and its
external "wrapper" SetConfigOption() - the division of labour between
the caller deciding on what it wants vs what the function does with some
combination of elevel and source internally is not very consistent at best.

I also note that a lot of places are actually calling
set_config_option() directly, so maybe there is an opportunity to unify
here as well.

Stefan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-03 16:57:54 Re: logical changeset generation v5
Previous Message Alvaro Herrera 2013-09-03 16:56:53 Re: Backup throttling