Re: PG + PHP, was Re: Zend survey result about dbms...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: newsy(at)lewczuk(dot)com, "Lista dyskusyjna pgsql-php" <pgsql-php(at)postgresql(dot)org>, "Lista dyskusyjna pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG + PHP, was Re: Zend survey result about dbms...
Date: 2003-09-20 14:50:00
Message-ID: 23474.1064069400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-php

Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-20 15:19:40 Re: State of Beta 2
Previous Message DN 2003-09-20 14:23:34 Question about connection java and Postgresql in Linux

Browse pgsql-php by date

  From Date Subject
Next Message Seader, Cameron 2003-09-20 17:32:24 Trouble with HTTP authentication and PostgreSQL validation
Previous Message Richard Huxton 2003-09-20 11:48:54 PG + PHP, was Re: Zend survey result about dbms...