Re: Custom session variables?

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'David Fetter'" <david(at)fetter(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Custom session variables?
Date: 2007-03-02 21:57:37
Message-ID: 048a01c75d15$cb4ac5c0$6400a8c0@dualcore
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Any way to pull the value of a config variable
into a pl/pgsql variable?

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Friday, March 02, 2007 3:46 PM
> To: David Fetter
> Cc: Adam Rich; pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Custom session variables?
>
>
> David Fetter <david(at)fetter(dot)org> writes:
> > On Fri, Mar 02, 2007 at 01:53:28PM -0600, Adam Rich wrote:
> >> Is there any way to define custom variables per session scope?
>
> > You can have them in PL/Perl(U), PL/Tcl(U) and PL/PythonU and other
> > such PLs, and you can create SQL accessors for them.
>
> Another possibility is the "customized GUC options" route:
> you can take
> advantage of the fact that the backend will let you set variables that
> don't exist yet, if they are in a namespace that postgresql.conf says
> is OK.
> http://www.postgresql.org/docs/8.2/static/runtime-config-custom.html
> This approach probably doesn't scale nicely to a whole lotta values,
> but for a dozen or so strings it'd work well enough.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2007-03-02 22:01:38 Re: I'd love to know what the rest of this error message is.
Previous Message Tom Lane 2007-03-02 21:45:30 Re: Custom session variables?