Re: Database privileges

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Diogo Martinez <diogo(dot)martinez(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Database privileges
Date: 2013-04-19 19:27:12
Message-ID: 21722.1366399632@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Diogo Martinez <diogo(dot)martinez(at)gmail(dot)com> writes:
> 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.

I'd bet JDBC isn't connecting to the same database, or maybe not even
the same server. Also, are you getting a failure on connect, or when
trying to select? If the former, maybe you need to fix pg_hba.conf
to allow JDBC to make a TCP connection (psql is probably coming in
via a unix-socket connection).

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel Staal 2013-04-19 21:46:52 Re: Conversion from 8.4 to >9 version question
Previous Message Day, David 2013-04-19 19:24:03 Re: Database privileges