X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 4B466CCD2E for ; Fri, 18 Jul 2003 14:26:03 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 32350-04 for ; Fri, 18 Jul 2003 14:26:26 +0000 (GMT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by svr1.postgresql.org (Postfix) with ESMTP id 3C111CCD2D for ; Fri, 18 Jul 2003 11:25:58 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19dWBq-0001ST-0U; Fri, 18 Jul 2003 15:26:30 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 7712A16AA8; Fri, 18 Jul 2003 15:26:28 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id CE46016AA6; Fri, 18 Jul 2003 15:26:27 +0100 (BST) From: Richard Huxton To: Chris Travers , pgsql-sql@postgresql.org Subject: Re: How to determine the currently logged on username Date: Fri, 18 Jul 2003 15:25:51 +0100 User-Agent: KMail/1.5 References: <3F17F90F.5020403@travelamericas.com> In-Reply-To: <3F17F90F.5020403@travelamericas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307181525.52074.richardh@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/254 X-Sequence-Number: 14368 On Friday 18 July 2003 14:41, Chris Travers wrote: > Hi all; > > I will be writing a stored proceedure that will allow a currently logged > in user to change his/her password. The function needs to be only able > to change the password of the currently logged in user, so it will only > take a varchar() argument and needs to look up the username of the > currently logged in user. How do I do this? Any ideas? select CURRENT_USER; -- Richard Huxton Archonet Ltd