Re: [HACKERS] custom parameters cannot be removed once set

2015-12-30 Thread Joe Conway
On 12/30/2015 10:44 AM, Tom Lane wrote: > Meh. The real problem here is that people are abusing the custom-GUC > mechanism to implement session-lifespan variables. I do not think we > should encourage that; GUC offers neither adequate features for that > (eg, no way to declare a variable's type)

Re: [HACKERS] custom parameters cannot be removed once set

2015-12-30 Thread Joe Conway
On 12/30/2015 10:36 AM, Joe Conway wrote: > A side issue is that it would be nice if there were a way to check for a > custom parameter value without getting an error if it does not exist. > There is a missing_ok option to GetConfigOptionByName(), but we > currently don't expose it from SQL. I'd li

Re: [HACKERS] custom parameters cannot be removed once set

2015-12-30 Thread Tom Lane
Joe Conway writes: > Today I was reminded of an issue I have run across before, namely that > in a given postgres session, once a custom parameter has been set, there > is no way to remove it entirely. True. > This strikes me as, at least, surprising, and possibly should be > considered a bug. T