Re: [JDBC] query - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: [JDBC] query
Date
Msg-id 19523.1493484313@sss.pgh.pa.us
Whole thread Raw
In response to Re: [JDBC] query  (Chuck Davis <cjgunzel@gmail.com>)
Responses Re: [JDBC] query  (Dave Cramer <pg@fastcrypt.com>)
Re: query  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Chuck Davis <cjgunzel@gmail.com> writes:
> If I execute the select statement in psql it works as expected:
> ...
> If I execute the statement in my program (and this has been working for
> years on DB2) I get the following exception:
>  org.postgresql.util.PSQLException: ERROR: relation "infosys.company" does
> not exist

I'd lay pretty long odds that that means the program is connecting to a
different database than you're connecting to in psql.  Double-check the
connection URL it's using.

(A common variant of that is "program is using a different search_path",
but since you're failing on a schema-qualified relation name, search
path doesn't enter into it.)

            regards, tom lane


pgsql-jdbc by date:

Previous
From: Chuck Davis
Date:
Subject: Re: [JDBC] query
Next
From: Dave Cramer
Date:
Subject: Re: [JDBC] query