Re: can I define own variables? - Mailing list pgsql-general

From Trevor Talbot
Subject Re: can I define own variables?
Date
Msg-id 90bce5730710130121m4bf4c8a1hfe4a17ede4f99cf1@mail.gmail.com
Whole thread Raw
In response to Re: can I define own variables?  (Guy Rouillier <guyr-ml1@burntmail.com>)
List pgsql-general
On 10/12/07, Guy Rouillier <guyr-ml1@burntmail.com> wrote:

> I've had several occasions when a user-defined variable would have come
> in handy.  What is the scope of user_vars as you've defined them above?
>   Are they unique to a connection?  A user_id?  Or defined globally?
> Ideally, they would be connection-unique.  One place they would come in
> really handy is with web-apps using connection pooling.  I could stuff
> the userid of the person who connected to my secure website into a
> user_var, then the database could access that to track user actions.
> Right now, that is cumbersome to do, since the current_user is always
> the same: the userid for the connection pool.

The Veil project might be worth looking at: http://veil.projects.postgresql.org/

It's designed with providing row-level security through views in mind,
but it does that with global and session variable primitives.

pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Re: convert binary string to datum
Next
From: Ron Peterson
Date:
Subject: Re: convert binary string to datum