From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jonathan Bartlett <johnnyb6@SDF.lonestar.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Setting session global variables
Date: Wed, 16 May 2001 21:12:44 -0400
Message-ID: <8124.990061964@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0105170038040.4509-100000@sdf.lonestar.org>
References: <Pine.LNX.4.21.0105170038040.4509-100000@sdf.lonestar.org>
Jonathan Bartlett <johnnyb6@SDF.lonestar.org> writes:
> However, the only way I can see to implement this is to have session
> global variables. Is there a way to fake session global variables with a
> table? Any comments would be appreciated.
You could do it with temp tables: the same temp table name would refer
to a different table in each session.
(You realize, of course, that CURRENT_USER already exists per SQL spec.
I assume you just meant that you'd like to have things *like*
CURRENT_USER, but defined by yourself...)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, johnnyb6@SDF.lonestar.org
Subject: Re: Setting session global variables
In-Reply-To: <8124.990061964@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox