Re: Database privileges

From: "Day, David" <dday(at)redcom(dot)com>
To: Diogo Martinez <diogo(dot)martinez(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Database privileges
Date: 2013-04-19 19:24:03
Message-ID: 401084E5E73F4241A44F3C9E6FD79428A14D676E@exch-01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Diogo Martinez
Sent: Friday, April 19, 2013 12:22 PM
To: pgsql-novice(at)postgresql(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2013-04-19 19:27:12 Re: Database privileges
Previous Message Diogo Martinez 2013-04-19 16:21:30 Database privileges