Re: Constaints - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Constaints
Date
Msg-id 20041205173300.GA11530@wolff.to
Whole thread Raw
In response to Constaints  (Jake Stride <nsuk@users.sourceforge.net>)
Responses Re: Constaints  (Jake Stride <nsuk@users.sourceforge.net>)
List pgsql-general
On Sun, Dec 05, 2004 at 16:55:33 +0000,
  Jake Stride <nsuk@users.sourceforge.net> wrote:
> Is there anyway to declare a constant that you can then use within a
> postgresql 'session', i am connecting from a PHP based application and
> trying to integrate another.
>
> What I want to be able to do is setup a rule on another table so that
> whenever a query is run on the table it appends another value to the query.
>
> i.e i want to be able to do:
>
> 'SET someconstant an_id=1;'
>
> Then with a rule, running:
>
> SELECT * FROM a_table
>
> would become:
>
> SELECT * FROM a_table WHERE id=a_id
>
> is this possible?

At the worst you should be able to use a table with a row for each session
that includes the value to be used for each session.

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: SSL confirmation
Next
From: Andrew M
Date:
Subject: Re: SSL confirmation