From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: newsy@lewczuk.com, "Lista dyskusyjna pgsql-php" <pgsql-php@postgresql.org>
Cc: Lista dyskusyjna pgsql-general <pgsql-general@postgresql.org>
Subject: Re: PG + PHP, was Re: Zend survey result about dbms...
Date: Sat, 20 Sep 2003 10:50:00 -0400
Message-ID: <23474.1064069400@sss.pgh.pa.us> (raw)
In-Reply-To: <200309201248.54484.dev@archonet.com>
References: <000501c37e9e$0ecffc70$4701a8c0@marek>
<20022.1063984707@sss.pgh.pa.us>
<200309201248.54484.dev@archonet.com>
Richard Huxton <dev@archonet.com> writes:
> One thing I think would be useful is another pseudo-var in PG,
> something like APP_SESSION_VAR which can be set and then used in PG
> queries.
> Tom - if I offered to produce a patch for something like this - either a var
> or a function pair (get_app_session_var(), set_app_session_var(varchar))
> would it be likely to be accepted?
It'd depend a lot on the details of what you propose, I think. True
variables seem like they'd be rather invasive, not to mention possibly
error-prone (is "foo" a variable or a column reference?). However you
could do something pretty self-contained in the form of a couple of
functions. I'd suggest they support more than just one variable, btw.
How about "set_session_variable(varname, varvalue)" and
"get_session_variable(varname)"?
I should think we'd at least accept that as a contrib module; whether it
would become mainstream would probably depend on the level of interest.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: tgl@sss.pgh.pa.us, dev@archonet.com, pgsql-general@postgresql.org
Subject: Re: PG + PHP, was Re: Zend survey result about dbms...
In-Reply-To: <23474.1064069400@sss.pgh.pa.us>
References: <000501c37e9e$0ecffc70$4701a8c0@marek> <20022.1063984707@sss.pgh.pa.us> <200309201248.54484.dev@archonet.com> <23474.1064069400@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