Search Postgresql Archives

Re: Application user name attribute on connection pool

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

 



On Mon, Aug 2, 2010 at 07:30,  <rsmogura@xxxxxxxxxxxxxxx> wrote:
> Hello,
>
> I'm not member of this list, but because the 9th version of PostgreSQL is
> incoming, I would like to ask if there is possibility to add session
> property of application user

Not for 9.0 its more or less already cut.

> - this property, in contrast to login name,
> should be setted by driver (e.g. JDBC) to current user logged into
> application server. This for example, will allow triggers to store real
> user name in history tables or log subsystem (in future) to write who
> deleted this or that. Similarly solution is in Oracle.

You might be able to (ab)use the new application_name GUC, see
http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html#GUC-APPLICATION-NAME.

I have used custom GUCS, per session temporary tables and giving each
user an actual database 'role' for this in the past.  Any of those
with appropriate triggers works fairly well.  I find normally you end
up needing a temp table anyways as you end up wanting to log more than
just the user (for me its the "page_load" or the "action").

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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