On Wed, Feb 20, 2008 at 01:55:05PM -0500, Aidan Van Dyk wrote:
> * Joshua D. Drake <jd@commandprompt.com> [080220 13:43]:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Wed, 20 Feb 2008 13:27:25 -0500
> > Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > > For the point-and-drool crowd that can't cope with editing a text
> >
> > *ahem*
> >
> > I am far form a point and drool person and I am telling you:
> >
> > SET PERMANENTLY work_mem TO 65MB ;
> >
> > Is a heck of a lot more sane than editing a text file.
>
> I think the first step is really for some people to show code that
> "rewrites" the config file changing a setting reliably and correctly.
But what we're donig now is discussing *how to do that*, no?
> Once we have people comfortable with it rewriting the file, the
> bikeshedding can start as to how to "use" it through the SQL interface.
>
> But, until there's code out there...
> <bikeshedding>
> But as Tom said, that's *really* changing what SET has tradionally
> been.
>
> Why is a function something like this not sufficient:
> pg_save_setting('work_mem', '65MB', 'comment so I remeber')
> or,
> pg_save_setting('work_mem', '65MB')
> or even
> pg_save_setting('work_mem')
>
> Since it's a function:
> 1) It's "implementable" by anybody, in any fashion
> 2) It's implemtation is easily replacable by anyone, in any fashion
> 3) It's easily backportable to adminpack/8.3/8.2/8.1 for those who want
> it
> </bikeshedding>
I for one am perfectly fine with a function instead of a parameter to SET.
Because it's less invasive, and because of your argumen 3 above.
//Magnus