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

Re: [INTERFACES] Re: [QUESTIONS] postgresql-6.3 and jdbc - grief

From: Peter T Mount <pgint(at)maidast(dot)demon(dot)co(dot)uk>
To: "Stephan B(dot) Doliov" <doliov(at)statsol(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Re: [QUESTIONS] postgresql-6.3 and jdbc - grief
Date: 1998-03-15 09:08:57
Message-ID: Pine.LNX.3.95.980315090211.21425D-100000@maidast (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Fri, 13 Mar 1998, Stephan B. Doliov wrote:

> Pter Mount wrote:
> > On Fri, 13 Mar 1998, Stephan B. Doliov wrote:
> > > I know i must be doing something inanely stupid but the jdbc driver that
> > > 
> > > in pg_hba.conf i have
> > > local      all  password password
> > > host       all   password password
> > This is your problem, the IP address & mask don't match (for postgresql's
> > purposes).
> > If you are trying to say: only is to have access, then it
> > should read:
> > host       all   password password
> > but, if you are saying that the network that resides is to
> > have access, and is the netmask, then this should read:
> thanks for clarifying my consfusion regarding netmasks (i just did an
> ifconfig -a on my le0 (ethernet) interface and saw the netmask ws
> ffffffe0) and so thought that is what i should put in the pg_hba.conf
> file.
> however - the mystery i still have not yet been able to solve is why do i
> have to speccify the host in the url in order to get the jdbc driver to
> work.
> jdbc:postgresql:funnystuff fails
> jdbc:postgresql:// works.
> pg_hba.conf reads:
> local   all    password      password
> host    all   password   password

To get just jdbc:postgresql:funnystuff to work you need to add localhost
to ph_hba.conf, ie:

host all password password

ps: the second password isn't required, as 6.3 now uses the pg_shadow
table for storing passwords, and the ALTER USER statement allows you to
change the password - no need to use the pg_password utility.

> is it because poastmaster is running with the -i option?  if i let the
> pg_hba.conf file for local read
> local   all   trust
> i don't need to specify the hostname in the url.

local in pg_hba.conf refers to the UNIX domain socket.

> by and large, i can live with this no problem, it's just that my curiosity
> has been greatly aroused by the observed behavior.

One thing I am doing, is that as some one has a problem like this, I'm
adding it to the FAQ (prior to writing some proper docs) for the JDBC

Peter T Mount  petermount(at)earthling(dot)net or pmount(at)maidast(dot)demon(dot)co(dot)uk
Main Homepage:
Work Homepage: Work EMail: peter(at)maidstone(dot)gov(dot)uk

In response to

pgsql-interfaces by date

Next:From: Rudi HeitbaumDate: 1998-03-15 10:41:23
Subject: Re: location of latest postodbc source
Previous:From: Peter T MountDate: 1998-03-15 08:59:30
Subject: Re: [INTERFACES] Re: [QUESTIONS] postgresql-6.3 and jdbc -i not the problem

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