Re: Audit-trail engine: getting the application's layer user_id

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: "Marcelo de Moraes Serpa" <celoserpa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Audit-trail engine: getting the application's layer user_id
Date: 2007-04-24 18:54:47
Message-ID: 87abwxzjpk.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Marcelo de Moraes Serpa" <celoserpa(at)gmail(dot)com> writes:

> I forgot to add the link to the article I've mentioned:
>
> http://www-128.ibm.com/developerworks/db2/library/techarticle/0302stolze/0302stolze.html#section2b
>
> This is what I'd like to do on PostgreSQL,

So, translating it to a simpler example:

You want that your function gets the connection ID it is using and
ties it to your current user ID at your application and then have
all your tables use a trigger to retrieve the user name from the
auxiliar table that maps "connection ID -> user", right?

That's what's in that page: a UDF (user defined function) named
getapplicationid() that will return the user login / name / whatever and
triggers.

What is preventing you from writing that? What is your doubt with
regards to how create that feature on your database?

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marcelo de Moraes Serpa 2007-04-24 19:05:44 Re: Audit-trail engine: getting the application's layer user_id
Previous Message Richard Huxton 2007-04-24 18:42:10 Re: Audit-trail engine: getting the application's layer user_id