Re: [GENERAL] Custom runtime variables

2009-06-26 Thread artacus
- Original Message - From: "Andreas Kretschmer" To: pgsql-general@postgresql.org Sent: Friday, June 26, 2009 1:58:08 AM GMT -08:00 US/Canada Pacific Subject: Re: [GENERAL] Custom runtime variables Scott Bailey wrote: > Thanks Tom. So how about accessing it from fr

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Andreas Kretschmer
Scott Bailey wrote: > Thanks Tom. So how about accessing it from from plpgsql or sql? test=# select * from current_setting('myvar.foo'); current_setting - (1 Zeile) Zeit: 0,163 ms test=*# test=*# set myvar.foo='bla'; SET Zeit: 0,117 ms test=*# select * from current_setting('my

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Pavel Stehule
2009/6/26 Scott Bailey : > >> Scott Bailey writes: >>> >>> I added the following lines to my postgresql.conf file: >>> custom_variable_classes = 'foo' >>> foo.name = '1s' >> >>> Now if I do "show foo.name" I get '1s' >>> But it does not show up in show all or in pg_settings. >> >> No, it doesn't.

Re: [GENERAL] Custom runtime variables

2009-06-26 Thread Scott Bailey
Scott Bailey writes: I added the following lines to my postgresql.conf file: custom_variable_classes = 'foo' foo.name = '1s' Now if I do "show foo.name" I get '1s' But it does not show up in show all or in pg_settings. No, it doesn't. It should still work in set/show though. Also, can t

Re: [GENERAL] Custom runtime variables

2009-06-25 Thread Tom Lane
Scott Bailey writes: > I added the following lines to my postgresql.conf file: > custom_variable_classes = 'foo' > foo.name = '1s' > Now if I do "show foo.name" I get '1s' > But it does not show up in show all or in pg_settings. No, it doesn't. It should still work in set/show though. > Also,

[GENERAL] Custom runtime variables

2009-06-25 Thread Scott Bailey
I want to be able to change the behavior of some functions based on custom runtime variables. I added the following lines to my postgresql.conf file: custom_variable_classes = 'foo' foo.name = '1s' Now if I do "show foo.name" I get '1s' But it does not show up in show all or in pg_settings. I