On Wed, Nov 3, 2010 at 1:04 PM, Gabriel Dinis <
gabriel.di...@vigiesolutions.com> wrote:
> Dear all,
>
> Imagine I have two users "Maria" and "Ana" using a PHP site.
> There is a common Postgres user "phpuser" for both.
> I'm creating audit tables to track the actions made by each PHP site user.
>
Thanks to all.
You are great!
On Wed, Nov 3, 2010 at 3:16 PM, Bill Moran wrote:
> In response to "Massa, Harald Armin" :
>
> > Bill,
> >
> > >
> > >
> > > We got this same kind of thing working by using PostgreSQL env
> variables.
> > > First, set custom_variable_classes in your postgresql.con
In response to "Massa, Harald Armin" :
> Bill,
>
> >
> >
> > We got this same kind of thing working by using PostgreSQL env variables.
> > First, set custom_variable_classes in your postgresql.conf. You can then
> > use the SET command to set variables of that class, and use them in your
> > fun
Bill,
>
>
> We got this same kind of thing working by using PostgreSQL env variables.
> First, set custom_variable_classes in your postgresql.conf. You can then
> use the SET command to set variables of that class, and use them in your
> functions:
>
> that is an interesting hack. Just googled up
Gabriel,
what you are looking for is also called "session variables". There are
essentially 2 kind of receipes in the wild:
a) store those session information in temporary tables
b) store those session information in shared memory
version a) has the advantage that it can be done via plpgsql, and
In response to Gabriel Dinis :
> Dear all,
>
> Imagine I have two users "Maria" and "Ana" using a PHP site.
> There is a common Postgres user "phpuser" for both.
> I'm creating audit tables to track the actions made by each PHP site user.
>
> *I have used the following code:*
>
> CREATE OR REPL
Dear all,
Imagine I have two users "Maria" and "Ana" using a PHP site.
There is a common Postgres user "phpuser" for both.
I'm creating audit tables to track the actions made by each PHP site user.
*I have used the following code:*
CREATE OR REPLACE FUNCTION MinUser_audit() RETURNS TRIGGER AS $u