pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Wagner <wagner@imsd.uni-mainz.de>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: passing Windows NT user name to postgres triggers for logging
Date: Thu, 21 Jun 2001 12:50:57 +0200
Message-ID: <3B31D191.A648E2E7@imsd.uni-mainz.de> (raw)

Hi,

we are currently using the following configuration:
There is a postgresql database running on linux. User applications are
running on Windows NT, using Access as a frontend. The tables are
connected as static ODBC links with username and password in their DSN
definitions.

This means: Many different users may connect to our application server
with different NT user accounts. But within the scope of the postgres
database there is only one user. This is the user the ODBC connections
are defined with.

Our problem:

When implementing logging functions/triggers in postgresql, we have only
the pg username (getpgusername()), but we need the NT user name of the
users that connect to our terminal server and open our access frontend.

My questions:

Is there any trick to get the NT user names passed through the
connection or SQL statement?

For example, if we decide to let every user get its own postgres
account, there would still be the problem that one has to define one
single username when linking the ODBC data source into access.

Are there any other solutions?

We simple need to get the users name in our triggers.

Thank you a lot,

Markus



view thread (3+ messages)  latest in thread

Message-ID: <3B31D191.A648E2E7@imsd.uni-mainz.de>
Permalink:  ../3B31D191.A648E2E7@imsd.uni-mainz.de/
Also on:    postgresql.org/message-id/3B31D191.A648E2E7@imsd.uni-mainz.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: wagner@imsd.uni-mainz.de
  Subject: Re: passing Windows NT user name to postgres triggers for logging
  In-Reply-To: <3B31D191.A648E2E7@imsd.uni-mainz.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox