Re: CREATE FUNCTION .. SET vs. pg_dump - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject Re: CREATE FUNCTION .. SET vs. pg_dump
Date
Msg-id 52261510.8070907@kaltenbrunner.cc
Whole thread Raw
In response to Re: CREATE FUNCTION .. SET vs. pg_dump  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 09/03/2013 06:15 PM, Robert Haas wrote:
> On Sun, Sep 1, 2013 at 10:36 AM, Stefan Kaltenbrunner
> <stefan@kaltenbrunner.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: logical changeset generation v5
Next
From: Tom Lane
Date:
Subject: Re: The PostgreSQL License requires "LICENSE" file?