Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4VVW-0001ez-M8 for pgsql-jdbc@arkaria.postgresql.org; Sat, 29 Apr 2017 16:46:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d4VVV-0003Tp-O0 for pgsql-jdbc@arkaria.postgresql.org; Sat, 29 Apr 2017 16:46:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d4VUz-0002ax-LI for pgsql-jdbc@postgresql.org; Sat, 29 Apr 2017 16:45:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d4VUi-0006sX-Du for pgsql-jdbc@postgresql.org; Sat, 29 Apr 2017 16:45:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v3TGjDgn019524; Sat, 29 Apr 2017 12:45:13 -0400 From: Tom Lane To: Chuck Davis cc: pgsql-jdbc@postgresql.org Subject: Re: query In-reply-to: References: Comments: In-reply-to Chuck Davis message dated "Sat, 29 Apr 2017 09:12:46 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19522.1493484313.1@sss.pgh.pa.us> Date: Sat, 29 Apr 2017 12:45:13 -0400 Message-ID: <19523.1493484313@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Chuck Davis 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 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc