postgresql jdbc connect via hostname instead of just ip

From: Jonathan Schreiter <jonathanschreiter(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: postgresql jdbc connect via hostname instead of just ip
Date: 2005-12-04 18:34:30
Message-ID: 20051204183430.19752.qmail@web33404.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I'm a bit new to postgresql. I've been able to
configure the database and the jdbc interface
successfully. I interface via PAM (krb5) and that
works OK in the pg_hba.conf file. I've added the -i
option to the postmaster startup script service (using
binary RPMs on Fedora Core 4) for tcp connections
(default port 5432).

The only way I can connect to the database via JDBC
seems to be by IP address (both locally and on another
system allowed by the pg_hba.conf file).

jdbc:postgresql://theipaddressofdatabaseserver/mydatabase

I'd like to be able to connect to the database this
way using a DNS name / computer host name. The
specific error I recieve is on the lines of no route
to host.

I'm sure I'm just missing a simple setting somewhere.
Can anyone point me in the right direction?

pg_hba.conf
host mydatabase all 127.0.0.1/32 pam
host mydatabase all theipsubnet/24 pam

Many thanks,
Jonathan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Douglas McNaught 2005-12-04 21:07:55 Re: postgresql jdbc connect via hostname instead of just ip
Previous Message Tino Wildenhain 2005-12-04 17:28:53 Re: Slow COUNT