X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D7157D1B51B for ; Tue, 14 Oct 2003 18:06:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 61439-01 for ; Tue, 14 Oct 2003 15:06:03 -0300 (ADT) Received: from mailgw1.syncinc.com (unknown [63.126.54.34]) by svr1.postgresql.org (Postfix) with ESMTP id 6847FD1B53F for ; Tue, 14 Oct 2003 15:05:58 -0300 (ADT) Received: from ascwf14yqi3m2t (h000ae69b8247.ne.client2.attbi.com [24.62.105.235]) by mailgw1.syncinc.com (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTPA id <0HMR0054VE8NZQ@mailgw1.syncinc.com> for pgsql-sql@postgresql.org; Tue, 14 Oct 2003 14:05:12 -0400 (EDT) Date: Tue, 14 Oct 2003 14:05:53 -0400 From: Michael Brusser Subject: How to determine the current user To: pgsql-sql@postgresql.org Reply-To: michael@synchronicity.com Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/164 X-Sequence-Number: 15564 I'm running Pg v7.3.4 I have a function where I need to determine the current user. But since the function was created with option "SECURITY DEFINER" (it has to be this way) current_user returns the name of creator, rather than current user. Is there a way in such function find out the real current user? Thanks, Mike.