Re: Constaints

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jake Stride <nsuk(at)users(dot)sourceforge(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Constaints
Date: 2004-12-05 17:33:00
Message-ID: 20041205173300.GA11530@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 05, 2004 at 16:55:33 +0000,
Jake Stride <nsuk(at)users(dot)sourceforge(dot)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.

In response to

  • Constaints at 2004-12-05 16:55:33 from Jake Stride

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew M 2004-12-05 17:36:49 Re: SSL confirmation
Previous Message Michael Fuhr 2004-12-05 17:03:59 Re: SSL confirmation