Re: Database privileges - Mailing list pgsql-novice

From Day, David
Subject Re: Database privileges
Date
Msg-id 401084E5E73F4241A44F3C9E6FD79428A14D676E@exch-01
Whole thread Raw
In response to Database privileges  (Diogo Martinez <diogo.martinez@gmail.com>)
List pgsql-novice

Probably the problem is your pg_hba.conf file which can filter access by IP address.

Your JDBC connection is perhaps via a hostname ( not localhost ) and your psql attachment was via local host.

A default installation only allows for localhost access.

 

e,g,

 

psql –h localhost  newdb    vs psql –h hostname

 

if one works and the other does not then adjust your pg_hba.conf file to allow access from other then localhost interface.

 

 

Rgds

 

 

Dave

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Diogo Martinez
Sent: Friday, April 19, 2013 12:22 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Database privileges

 

Hi,

 

I've installed PostgreSQL 9.2.4, created a new database, created 1 new role and 1 table called t_test.

When I connect using psql with my new role and do a simple query (select * from t_test), it works fine, but when I connect using JDBC using the same role, I get a no privileges exception.

 

Can anybody help me, please?

 

Thanks,

Diogo

pgsql-novice by date:

Previous
From: kobolds
Date:
Subject: create database with owner
Next
From: Tom Lane
Date:
Subject: Re: Database privileges