JDBC Postgres problem - Mailing list pgsql-general

From Tyler Hains
Subject JDBC Postgres problem
Date
Msg-id H000006900c79624.1278624296.mailpa.profitpointinc.com@MHS
Whole thread Raw
Responses Re: JDBC Postgres problem
List pgsql-general

We are having a very strange issue where for certain records, queries sent via JDBC return no results when the identical query via command line or pgadmin return non-null (expected) results. Example below. We are running 8.3.9.

 

>> SELECT client_id FROM locations WHERE external_id = '278';

>> 

>> Doing an EXPLAIN ANALYZE from psql gives:

>> 

>>  Seq Scan on locations  (cost=0.00..17.01 rows=1 width=4) (actual

>> time=0.189..0.197 rows=1 loops=1)

>>    Filter: ((external_id)::text = '278'::text)  Total runtime: 0.245

>> ms

>> 

>> And doing the same thing from JDBC stmt.executeQuery() gives:

>> 

>> Seq Scan on locations  (cost=0.00..17.93 rows=1 width=4) (actual

>> time=0.206..0.206 rows=0 loops=1)

>>   Filter: ((external_id)::text = '278'::text) Total runtime: 0.221 ms

 

Note the 0 rows returned via JDBC. Has anyone ever heard of anything like this before?

 

Thanks,

Tyler Hains

IT Director

ProfitPoint, Inc.

www.profitpointinc.com

 

 

pgsql-general by date:

Previous
From: Andrew Maclean
Date:
Subject: Re: Problems with Vista and Windows 7
Next
From: "Carlo Stonebanks"
Date:
Subject: Wrote a proc for massive updates - will I have problems?