Received: from u1.abs.net (root@u1.abs.net [207.114.0.131]) by hub.org (8.9.1/8.9.1) with ESMTP id QAA11217 for ; Thu, 12 Nov 1998 16:59:35 -0500 (EST) (envelope-from daveh@insightdist.com) Received: from insightdist.com (nobody@localhost) by u1.abs.net (8.9.0/8.9.0) with UUCP id QAA12218 for pgsql-sql@postgreSQL.org; Thu, 12 Nov 1998 16:58:26 -0500 (EST) X-Authentication-Warning: u1.abs.net: nobody set sender to insightdist.com!daveh using -f Received: from ceodev by insightdist.com (AIX 3.2/UCB 5.64/4.03) id AA21139; Thu, 12 Nov 1998 16:48:51 -0500 Received: from daveh by ceodev (AIX 4.1/UCB 5.64/4.03) id AA56956; Thu, 12 Nov 1998 16:48:33 -0500 Message-Id: <364B589A.1400E1B5@insightdist.com> Date: Thu, 12 Nov 1998 16:52:26 -0500 From: David Hartwig Organization: Insight Distribution Systems X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: en Mime-Version: 1.0 To: Jorge Maturana Cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Current User References: <199811112331.UAA12693@rauli.labsd.inf.utfsm.cl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit select CURRENT_USER; -- or -- select usesysid from pg_user where usename = CURRENT_USER; Jorge Maturana wrote: > Hi, > > I want to have a table to manage a register of the modifications made to > several tables by a group of users, that table should contain the name of the > postgres user that made the modificaction, now, How can I get the name (or > the user id) of the current user logged in?,there are some "pg_currentuser" > table to make a select? > > I would thank any help. > > -- > Jorge Maturana Ortiz > Laboratorio de Sistemas Distribuidos - Departamento de Informatica > Universidad Tecnica Federico Santa Maria, Valparaiso - Chile > mailto:ateo@labsd.inf.utfsm.cl