Skip site navigation (1) Skip section navigation (2)

Re: host name?

From: "Igor Neyman" <ineyman(at)perceptron(dot)com>
To: "Ray Stell" <stellr(at)cns(dot)vt(dot)edu>
Cc: "Andy Shellam \(Mailing Lists\)" <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: host name?
Date: 2007-02-26 18:26:42
Message-ID: F4C27E77F7A33E4CA98C19A9DC6722A201ADF767@EXCHANGE.corp.perceptron.com (view raw or flat)
Thread:
Lists: pgsql-admin
Right, I looked at pg_stat_activity, but besides having ip address
(instead of machine name), it doesn't have clent program name connected
to PG. 

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Ray Stell
Sent: Monday, February 26, 2007 12:53 PM
To: Igor Neyman
Cc: Andy Shellam (Mailing Lists); pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] host name?



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(at)postgresql(dot)org 
> [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Andy Shellam 
> (Mailing Lists)
> Sent: Monday, February 26, 2007 10:56 AM
> To: Igor Neyman
> Cc: pgsql-admin(at)postgresql(dot)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.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
       message can get through to the mailing list cleanly


In response to

pgsql-admin by date

Next:From: Igor NeymanDate: 2007-02-26 18:27:33
Subject: Re: host name?
Previous:From: Ray StellDate: 2007-02-26 17:53:18
Subject: Re: host name?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group