Re: set_config() documentation clarification

2021-01-06 Thread Pavel Stehule
> > > >> SET >> g = year % 19, >> c = year / 100, >> h = (c - c/4 - (8*c + 13)/25 + 19*g + 15) % 30, >> i = h - (h/28)*(1 - (h/28)*(29/(h + 1))*((21 - g)/11)), >> j = year + year/4 + i + 2 - c + c/4) % 7, >> p = i - j, >> easter_month = 3 + (p + 26)/30, >> easter_day = 1 + (p + 27 +

Re: set_config() documentation clarification

2021-01-06 Thread Pavel Stehule
út 5. 1. 2021 v 22:15 odesílatel Joel Jacobson napsal: > On Tue, Jan 5, 2021, at 21:34, Pavel Stehule wrote: > > yes, it is supported. More the schema variables supports RESET to > default on transaction end, > > and supports access rights for usage in security definer functions. > > Nice. > > >

Re: set_config() documentation clarification

2021-01-05 Thread Joel Jacobson
On Tue, Jan 5, 2021, at 20:28, Bruce Momjian wrote: > Oh, I know it is useful. My pg_cryptokey uses it: > https://momjian.us/download/pgcryptokey/ Looks like a nice extension I could use sometimes myself, thanks for sharing. /Joel

Re: set_config() documentation clarification

2021-01-05 Thread Chapman Flack
On 01/05/21 16:14, Joel Jacobson wrote: > or maybe even WITH like this: > > WITH > year % 19 AS g , > year / 100 AS c, > (c - c/4 - (8*c + 13)/25 + 19*g + 15) % 30 AS h, > h - (h/28)*(1 - (h/28)*(29/(h + 1))*((21 - g)/11)) AS i, > year + year/4 + i + 2 - c + c/4) % 7 AS j, > i - j AS p

Re: set_config() documentation clarification

2021-01-05 Thread Tom Lane
Bruce Momjian writes: > On Tue, Jan 5, 2021 at 08:23:15PM +0100, Joel Jacobson wrote: >> út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: >>> I think I tried to make this feature more visible a few years ago and >>> some people said we might remove it someday, so don't do that. If that >>

Re: set_config() documentation clarification

2021-01-05 Thread Joel Jacobson
On Tue, Jan 5, 2021, at 21:34, Pavel Stehule wrote: > yes, it is supported. More the schema variables supports RESET to default on > transaction end, > and supports access rights for usage in security definer functions. Nice. > Maybe - I don't know what "Statement variables" :). Other databases

Re: set_config() documentation clarification

2021-01-05 Thread Pavel Stehule
út 5. 1. 2021 v 21:34 odesílatel Pavel Stehule napsal: > > > út 5. 1. 2021 v 20:23 odesílatel Joel Jacobson napsal: > >> út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: >> > I think I tried to make this feature more visible a few years ago and >> > some people said we might remove it som

Re: set_config() documentation clarification

2021-01-05 Thread Pavel Stehule
út 5. 1. 2021 v 20:23 odesílatel Joel Jacobson napsal: > út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: > > I think I tried to make this feature more visible a few years ago and > > some people said we might remove it someday, so don't do that. If that > > is false, I think we can make

Re: set_config() documentation clarification

2021-01-05 Thread Bruce Momjian
On Tue, Jan 5, 2021 at 08:23:15PM +0100, Joel Jacobson wrote: > út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: > > I think I tried to make this feature more visible a few years ago and > > some people said we might remove it someday, so don't do that. If that > > is false, I think we can

Re: set_config() documentation clarification

2021-01-05 Thread Joel Jacobson
út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: > I think I tried to make this feature more visible a few years ago and > some people said we might remove it someday, so don't do that. If that > is false, I think we can make it more prominent. I think it's false. I'll try to give you a r

Re: set_config() documentation clarification

2021-01-05 Thread Pavel Stehule
út 5. 1. 2021 v 18:51 odesílatel Bruce Momjian napsal: > On Mon, Jan 4, 2021 at 09:46:32AM -0700, David G. Johnston wrote: > > On Mon, Jan 4, 2021 at 8:26 AM Joel Jacobson wrote: > > > > In the documentation at https://www.postgresql.org/docs/current/ > > functions-admin.html > > th

Re: set_config() documentation clarification

2021-01-05 Thread Bruce Momjian
On Mon, Jan 4, 2021 at 09:46:32AM -0700, David G. Johnston wrote: > On Mon, Jan 4, 2021 at 8:26 AM Joel Jacobson wrote: > > In the documentation at https://www.postgresql.org/docs/current/ > functions-admin.html > this behaviour is not mentioned anywhere as far as I can see: > > >

Re: set_config() documentation clarification

2021-01-04 Thread David G. Johnston
On Mon, Jan 4, 2021 at 8:26 AM Joel Jacobson wrote: > In the documentation at > https://www.postgresql.org/docs/current/functions-admin.html > this behaviour is not mentioned anywhere as far as I can see: > > https://www.postgresql.org/docs/current/runtime-config-custom.html I do think "Customiz

Re: set_config() documentation clarification

2021-01-04 Thread Chapman Flack
On 01/04/21 10:25, Joel Jacobson wrote: > I just learned from a pg friend, it's possible to set your own made up > setting_name using set_config(), > if the setting_name contains at least one dot ".". It works that way so you can set a config variable needed by an extension, if necessary before t

set_config() documentation clarification

2021-01-04 Thread Joel Jacobson
I just learned from a pg friend, it's possible to set your own made up setting_name using set_config(), if the setting_name contains at least one dot ".". I didn't know about this and have always thought it's not possible, due to early in my career having run into the error message you get when n