Skip site navigation (1) Skip section navigation (2)

Re: User action accounting

From: Joshua Berry <yoberi(at)gmail(dot)com>
To: Andy Colson <andy(at)squeakycode(dot)net>, PostgreSQL - General <pgsql-general(at)postgresql(dot)org>
Subject: Re: User action accounting
Date: 2010-03-30 16:13:37
Message-ID: 5ccd53c11003300913g63e16dddm2118867c685f4a0e@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Tue, Mar 30, 2010 at 10:46 AM, Andy Colson <andy(at)squeakycode(dot)net> wrote:

> When your app/users connect to the db, do they connect as the same user, or
> each with a different username?
>

The application instances each connect to the database with the same
username. The application currently uses an ODBC connection which has hard
coded username values. If each user has their own workstation, this would be
easy, but I want to be able to specify the username when the application
begins. I'm not worried about the security aspect; I just want to present
users with an easy way to specify who they are to aid in tracking.


> Do you have your own "users" table?


There is a "users" table currently used for another purpose, but it could be
reused/extended.

If I go the route of keeping the same role for each application instance, it
would be great if I could avoid having to pass the username into each query
and instead have a per-session or per-connection variable that the trigger
could access. Sounds easy, but I've never tried it before and things not
usually as easy as they seem.

Regards,

-Joshua

In response to

Responses

pgsql-general by date

Next:From: Merlin MoncureDate: 2010-03-30 16:24:45
Subject: Re: Dblink vs calling a function that returns void
Previous:From: Andy ColsonDate: 2010-03-30 15:46:11
Subject: Re: User action accounting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group