Remote connection via psql

From: Francois Suter <dba(at)paragraf(dot)ch>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Remote connection via psql
Date: 2002-09-04 14:17:54
Message-ID: B99BE2B2.1895%dba@paragraf.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I used psql a lot and generally work directly on my development server. Now
sometimes I am on another machine, but when I try to acces the database with
something like this:

psql -d dbname -U username -h 192.168.1.2

I get the following message: "psql: unknown host name: 192.168.1.2"

I am a bit puzzled, because I have no such problem e.g. from a Perl script:

$conn = Pg::connectdb("dbname=dname user=username hostaddr=192.168.1.2
port=5432") or die "Can't open: $!\n";

psql seems to expect a host name rather than an IP address and I haven't
found any other option in the psql doc. Any way out of this?

--------
François

Home page: http://www.monpetitcoin.com/
"A fox is a wolf who sends flowers"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message dima 2002-09-04 14:32:29 Re: Remote connection via psql
Previous Message Tom Lane 2002-09-04 14:04:38 Re: clog problem