8.1.11 PREPARE problem? - Mailing list pgsql-general

From Jeremiah Jahn
Subject 8.1.11 PREPARE problem?
Date
Msg-id 1229620898.1933.27.camel@bluejay.goodinassociates.com
Whole thread Raw
Responses Re: 8.1.11 PREPARE problem?
Re: 8.1.11 PREPARE problem?
List pgsql-general
This is with jdbc3-415. None of the (jdbc, or pg) change logs since then
have mentioned this problem. When run as a prepared statement the first
statement will execute and return results, while the next two seem to
execute, but return no results. When run by hand, not prepared , each
statement runs just fine. when using an older version of the jdbc driver
(7.3?), that does not call PREPARE, things work just fine. Looking at
the logs below, it sure looks like the statements are running, given the
different durations, which are correct for the differences between the
statements. help please.




Dec 18 10:59:15 devel postgres[6889]: [2-1] LOG:  duration: 358.005 ms  statement: EXECUTE <unnamed>  [PREPARE:
selectaggregationvalue.value as 
Dec 18 10:59:15 devel postgres[6889]: [2-2]  aggregationvalue$value,aggregationvalue.aggregatetype as
aggregationvalue$aggregatetype,aggregationvalue.countas 
Dec 18 10:59:15 devel postgres[6889]: [2-3]  aggregationvalue$count,aggregationvalue.stoptime as
aggregationvalue$stoptime,aggregationvalue.starttimeas 
Dec 18 10:59:15 devel postgres[6889]: [2-4]  aggregationvalue$starttime from aggregationvalue where  date_trunc($1,
aggregationvalue.stoptime)between $2 and $3  and 
Dec 18 10:59:15 devel postgres[6889]: [2-5]  aggregationvalue.aggregatetype = $4 and
split_part(aggregationvalue.value,':',1)= $5  and  
Dec 18 10:59:15 devel postgres[6889]: [2-6]  split_part(aggregationvalue.value,':',2) like $6  and
split_part(aggregationvalue.value,':',3)like $7  ] 

Dec 18 10:59:25 devel postgres[6889]: [4-1] LOG:  duration: 25.001 ms  statement: EXECUTE <unnamed>  [PREPARE:
selectaggregationvalue.value as 
Dec 18 10:59:25 devel postgres[6889]: [4-2]  aggregationvalue$value,aggregationvalue.aggregatetype as
aggregationvalue$aggregatetype,aggregationvalue.countas 
Dec 18 10:59:25 devel postgres[6889]: [4-3]  aggregationvalue$count,aggregationvalue.stoptime as
aggregationvalue$stoptime,aggregationvalue.starttimeas 
Dec 18 10:59:25 devel postgres[6889]: [4-4]  aggregationvalue$starttime from aggregationvalue where  date_trunc($1,
aggregationvalue.stoptime)between $2 and $3  and 
Dec 18 10:59:25 devel postgres[6889]: [4-5]  aggregationvalue.aggregatetype = $4 and
split_part(aggregationvalue.value,':',1)= $5  and  
Dec 18 10:59:25 devel postgres[6889]: [4-6]  split_part(aggregationvalue.value,':',2) like $6  and
split_part(aggregationvalue.value,':',3)like $7  ] 

Dec 18 10:59:25 devel postgres[6889]: [6-1] LOG:  duration: 2.000 ms  statement: EXECUTE <unnamed>  [PREPARE:    select
aggregationvalue.valueas 
Dec 18 10:59:25 devel postgres[6889]: [6-2]  aggregationvalue$value,aggregationvalue.aggregatetype as
aggregationvalue$aggregatetype,aggregationvalue.countas 
Dec 18 10:59:25 devel postgres[6889]: [6-3]  aggregationvalue$count,aggregationvalue.stoptime as
aggregationvalue$stoptime,aggregationvalue.starttimeas 
Dec 18 10:59:25 devel postgres[6889]: [6-4]  aggregationvalue$starttime from aggregationvalue where  date_trunc($1,
aggregationvalue.stoptime)between $2 and $3  and 
Dec 18 10:59:25 devel postgres[6889]: [6-5]  aggregationvalue.aggregatetype = $4 and
split_part(aggregationvalue.value,':',1)= $5  and  
Dec 18 10:59:25 devel postgres[6889]: [6-6]  split_part(aggregationvalue.value,':',2) like $6  and
split_part(aggregationvalue.value,':',3)like $7  ] 


pgsql-general by date:

Previous
From: aravind chandu
Date:
Subject: Re: Syntax error with select statement
Next
From: Howard Cole
Date:
Subject: Re: Server side large object functions