Diogo Martinez <diogo.martinez@gmail.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