Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AA2A69FBA3A for ; Mon, 26 Feb 2007 13:54:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 94622-02 for ; Mon, 26 Feb 2007 13:53:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from locust.cns.vt.edu (locust.cns.vt.edu [198.82.169.14]) by postgresql.org (Postfix) with ESMTP id 877689FB866 for ; Mon, 26 Feb 2007 13:53:40 -0400 (AST) Received: by locust.cns.vt.edu (Postfix, from userid 986) id C0F83118A38; Mon, 26 Feb 2007 12:53:18 -0500 (EST) Date: Mon, 26 Feb 2007 12:53:18 -0500 From: Ray Stell To: Igor Neyman Cc: "Andy Shellam (Mailing Lists)" , pgsql-admin@postgresql.org Subject: Re: host name? Message-ID: <20070226175318.GB7269@cns.vt.edu> References: <45E30326.20107@mailnetwork.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/333 X-Sequence-Number: 24798 not sure how to resolve the name, but maybe this is close enough: select usename, client_addr from pg_catalog.pg_stat_activity; On Mon, Feb 26, 2007 at 11:47:13AM -0500, Igor Neyman wrote: > You are right, wrong question. > What I really want to know is formulated in my next message. > Which is: based on program (connected to PG) name find the machine name > it runs on. > > For those familiar with Oracle, it's program, machine columns in > v$session view. > > Igor > > ________________________________ > > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Andy Shellam > (Mailing Lists) > Sent: Monday, February 26, 2007 10:56 AM > To: Igor Neyman > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] host name? > > > Igor Neyman wrote: > > Is there a function (or catalog view) that I can call in psql > and that will tell me host name of the machine on which Postgres > database is running? > > Igor > > > Surely you need to know this to connect to it in the first place? > > -- You have no chance to survive make your time.