Re: Session variables (how do I pass session data to a function)

From: "Philip W(dot) Dalrymple" <pwd(at)mdtsoft(dot)com>
To: General Postgres Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Session variables (how do I pass session data to a function)
Date: 2008-10-21 13:01:54
Message-ID: 4205858.77231224594114802.JavaMail.root@is-mail-2.mdtsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just to complete the answer in this thread; the trick is
to do the following:

- define in your postgresql.conf:
custom_variable_classes = 'myvar'

Then see
http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADMIN-SET-TABLE
( with the variables named myvar.*)

thanks for everyone's help on this.
----- Original Message -----
From: "Guy Rouillier" <guyr-ml1(at)burntmail(dot)com>
To: "General Postgres Mailing List" <pgsql-general(at)postgresql(dot)org>
Sent: Monday, October 20, 2008 7:22:22 PM GMT -05:00 US/Canada Eastern
Subject: Re: [GENERAL] Session variables (how do I pass session data to a function)

Philip W. Dalrymple wrote:
>
> What I want to do is to add to this another field that will be NULL
> UNLESS the session sets a value to the "user" for that the middle-wear
> system is acting for.

This can be done via a setting. See
http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADMIN-SET-TABLE

If you'd like to read a fuller discussion of this very topic, search for
a thread titled "can I define own variables" in the archives. I had to
do the same thing back then.

--
Guy Rouillier

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
This email, and any files transmitted with it, is confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error,
please advise postmaster(at)mdtsoft(dot)com <mailto:postmaster(at)mdtsoft(dot)com>.

New MDT Software Headquarters (As of July 1, 2008):
3480 Preston Ridge Road
Suite 450
Alpharetta, GA 30005

Philip W. Dalrymple III <pwd(at)mdtsoft(dot)com>
MDT Software - The Change Management Company
+1 678 297 1001
Fax +1 678 297 1003

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brandon Metcalf 2008-10-21 13:07:50 syncing with a MySQL DB
Previous Message postgres Emanuel CALVO FRANCO 2008-10-21 13:00:30 Re: How to free disk space