Re: user defined variables - Mailing list pgsql-general

From Moritz Sinn
Subject Re: user defined variables
Date
Msg-id m34rgxttfh.fsf@freesources.org
Whole thread Raw
In response to Re: user defined variables  ("Joel Burton" <joel@joelburton.com>)
List pgsql-general
"Joel Burton" <joel@joelburton.com> writes:



> In the psql client, you can set a variable with the "\set" command, or using
> "--set" at startup. So "psql --set UID=xxxx" will let you use the the UID as
> "SELECT * FROM USER WHERE uid= :UID".
>
> Will this work for you?
>
> - J.

well, i'm using the php functions for communicating with postgresql. but
this means that it is possible.
has someone an idea how i can set such a variable when i open the
connection with php?

thanks,
 moritz

--
<grin> seen jhm
<dpkg> jhm is Sarek, and jhm is on the channel right now!
* JHM wonders why dpkg remembers that particular nick.
<grin> dpkg: Sarek? ermm, sure, and I am Khan
    -- Seen on #Debian

pgsql-general by date:

Previous
From: "Olonichev Sergei"
Date:
Subject: Re: How to add big amounts of data into database?
Next
From: "Russell Black"
Date:
Subject: Case Insensitive Data Type