Re: [HACKERS] Append to a GUC parameter ?

2014-10-11 Thread Bruce Momjian
On Thu, Aug 7, 2014 at 10:04:47AM -0400, Alvaro Herrera wrote: > Fabrízio de Royes Mello wrote: > > On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane wrote: > > > > > Josh Berkus writes: > > > > BTW, while there's unlikely to be a good reason to put search_path in > > > > pg.conf with appends, there ar

Re: [HACKERS] Append to a GUC parameter ?

2014-08-07 Thread Jerry Sievers
Alvaro Herrera writes: > Fabrízio de Royes Mello wrote: > >> On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane wrote: >> >> > Josh Berkus writes: >> > > BTW, while there's unlikely to be a good reason to put search_path in >> > > pg.conf with appends, there are a LOT of reasons to want to be able to >

Re: [HACKERS] Append to a GUC parameter ?

2014-08-07 Thread Alvaro Herrera
Fabrízio de Royes Mello wrote: > On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane wrote: > > > Josh Berkus writes: > > > BTW, while there's unlikely to be a good reason to put search_path in > > > pg.conf with appends, there are a LOT of reasons to want to be able to > > > append to it during a session

Re: [HACKERS] Append to a GUC parameter ?

2014-08-06 Thread Bruce Momjian
On Wed, Aug 6, 2014 at 12:12:29AM -0300, Fabrízio de Royes Mello wrote: > > On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane wrote: > > Josh Berkus writes: > > BTW, while there's unlikely to be a good reason to put search_path in > > pg.conf with appends, there are a LOT of reasons to wan

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Fabrízio de Royes Mello
On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane wrote: > Josh Berkus writes: > > BTW, while there's unlikely to be a good reason to put search_path in > > pg.conf with appends, there are a LOT of reasons to want to be able to > > append to it during a session. > > [shrug...] You can do that today wit

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Bruce Momjian
On Tue, Aug 5, 2014 at 07:22:13PM -0600, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: > >> However, other than shared_preload_libraries, I can't think of a GUC > >> which would benefit from this. Can you? > > > search_path? > > Given

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Bruce Momjian
On Tue, Aug 5, 2014 at 06:36:01PM -0700, Josh Berkus wrote: > On 08/05/2014 06:25 PM, Alvaro Herrera wrote: > > > I'm not sold on += as the syntax to use. It just needs to be something > > different from =. > > Alternative is to use "+" in the value string: > > shared_preload_libraries = '+au

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Tom Lane
Josh Berkus writes: > BTW, while there's unlikely to be a good reason to put search_path in > pg.conf with appends, there are a LOT of reasons to want to be able to > append to it during a session. [shrug...] You can do that today with current_setting()/set_config(). reg

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Josh Berkus
On 08/05/2014 06:25 PM, Alvaro Herrera wrote: > I'm not sold on += as the syntax to use. It just needs to be something > different from =. Alternative is to use "+" in the value string: shared_preload_libraries = '+auto_explain' ... not sure that's better. The alternative is to add an "appen

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Alvaro Herrera
David G Johnston wrote: > Alvaro Herrera-9 wrote > > I think this merits a new GUC flag, say GUC_LIST_ADDITIVE. > > Would that allow, without any special syntax, multiple declarations of, say, > shared_preload_libraries, to have their values appended instead of the most > (or least, I forget whic

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Tom Lane
Bruce Momjian writes: > On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: >> However, other than shared_preload_libraries, I can't think of a GUC >> which would benefit from this. Can you? > search_path? Given the security implications of search_path, assembling its value from indepe

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread David G Johnston
Alvaro Herrera-9 wrote > Bruce Momjian wrote: >> On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: >> > On 08/05/2014 11:12 AM, Jerry Sievers wrote: >> > > shared_preload_libraries += auto_explain >> > > >> > > Would do the trick. >> > > >> > > I've never heard this mentioned before s

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Alvaro Herrera
Bruce Momjian wrote: > On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: > > On 08/05/2014 11:12 AM, Jerry Sievers wrote: > > > shared_preload_libraries += auto_explain > > > > > > Would do the trick. > > > > > > I've never heard this mentioned before so presume not many have > > > co

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Bruce Momjian
On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: > On 08/05/2014 11:12 AM, Jerry Sievers wrote: > > shared_preload_libraries += auto_explain > > > > Would do the trick. > > > > I've never heard this mentioned before so presume not many have > > contemplated this. > > It's been discu

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Josh Berkus
On 08/05/2014 11:12 AM, Jerry Sievers wrote: > shared_preload_libraries += auto_explain > > Would do the trick. > > I've never heard this mentioned before so presume not many have > contemplated this. It's been discussed. However, other than shared_preload_libraries, I can't think of a GUC whi

[HACKERS] Append to a GUC parameter ?

2014-08-05 Thread Jerry Sievers
Using the 'include' keyword in postgresql.conf let's us do groovy things like paste together pieces of general purpose configs into the working file. -- But since all we can do is set/reset the parameters the possibility of concatenating fragments that use some of the list parameters won't