Received: from yara.imsd.uni-mainz.de (yara.IMSD.Uni-Mainz.DE [134.93.144.68]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5LArFa00161 for ; Thu, 21 Jun 2001 06:53:16 -0400 (EDT) (envelope-from wagner@imsd.uni-mainz.de) Received: (from smap@localhost) by yara.imsd.uni-mainz.de (8.9.3/8.9.3/lxs_5.2) id MAA30576 for ; Thu, 21 Jun 2001 12:52:21 +0200 Received: from hermes.imsd.uni-mainz.de(134.93.64.80) by yara.imsd.uni-mainz.de via smap (V2.1/2.1+anti-relay+anti-spam) id xma030573; Thu, 21 Jun 01 12:52:05 +0200 Received: from imsd.uni-mainz.de (unverified [134.93.64.34]) by hermes.imsd.uni-mainz.de (EMWAC SMTPRS 0.83) with SMTP id ; Thu, 21 Jun 2001 12:51:24 +0200 Message-ID: <3B31D191.A648E2E7@imsd.uni-mainz.de> Date: Thu, 21 Jun 2001 12:50:57 +0200 From: Markus Wagner Organization: IMSD X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces Subject: passing Windows NT user name to postgres triggers for logging Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/63 X-Sequence-Number: 1726 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