Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3CEE664FD69 for ; Thu, 20 Nov 2008 12:32:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14742-09 for ; Thu, 20 Nov 2008 12:31:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 74D0E64FD1A for ; Thu, 20 Nov 2008 12:31:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mAKGVo0T002913; Thu, 20 Nov 2008 11:31:50 -0500 (EST) To: "Swathi S" cc: pgsql-admin@postgresql.org Subject: Re: User login In-reply-to: <6c1264780811200412o4875f489v6d2a435f85326447@mail.gmail.com> References: <6c1264780811200412o4875f489v6d2a435f85326447@mail.gmail.com> Comments: In-reply-to "Swathi S" message dated "Thu, 20 Nov 2008 22:42:53 +1030" Date: Thu, 20 Nov 2008 11:31:50 -0500 Message-ID: <2912.1227198710@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/128 X-Sequence-Number: 30782 "Swathi S" writes: > How do we find which user logged in from the OS level in postgres. > For eg: If user "a" logged in from the OS level and logged into postgres > psql as user "b" .........how do we find the login details? You don't --- there's no way to find that out from the server side. What you might consider doing is tying the OS and postgres user identities together by using "ident" authorization --- but that's not real secure unless all the connections are local. regards, tom lane