Re: Custom runtime variables

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Custom runtime variables
Date: 2009-06-26 08:58:08
Message-ID: 20090626085808.GA14663@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Bailey <artacus(at)comcast(dot)net> 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('myvar.foo');
current_setting
-----------------
bla
(1 Zeile)

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-06-26 09:02:49 Re: masking the code
Previous Message luca.ciciriello 2009-06-26 08:56:34 masking the code