Search Postgresql Archives

Re: can I define own variables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/07, Guy Rouillier <guyr-ml1@xxxxxxxxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux