Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-04 Thread Mathieu De Zutter
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. (...)

[GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread 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 REPLACE FUNCTION MinUser_audit() RETURNS TRIGGER AS

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Bill Moran
In response to Gabriel Dinis gabriel.di...@vigiesolutions.com: 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:*

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Massa, Harald Armin
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

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread 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 functions: that is an interesting hack. Just googled up

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Bill Moran
In response to Massa, Harald Armin c...@ghum.de: 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

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Gabriel Dinis
Thanks to all. You are great! On Wed, Nov 3, 2010 at 3:16 PM, Bill Moran wmo...@potentialtech.com wrote: In response to Massa, Harald Armin c...@ghum.de: Bill, We got this same kind of thing working by using PostgreSQL env variables. First, set custom_variable_classes in