pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with Running Query
2+ messages / 2 participants
[nested] [flat]
* Problem with Running Query
@ 2007-04-06 16:57 Bellur Ashwin <bell_ashwin@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: Bellur Ashwin @ 2007-04-06 16:57 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I have modified my postgres code to accept queries starting with a word "My" followed by the query followed by the 1000 #separated values,
inside postgres, i check for the word "My" at the beginning of the query if found, i will generate 1000 inserts into a table (these 1000 values are those i have sent after the query with the delimiter #), then execute the query which is in between "My" and #values,
Example: My query would look like this
My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3...........
Now my problem is when i try to send the new (appended) query to the JDBC, i get
ArrayIndexOutOfBoundException: Index: 1 Size: 1
from the executeQuery function, here my query is reaching the postgres and is executing, but i am getting the exception in my JAVA Program
Any Idea of why i am getting the exception.
With Regards,
Bellur Ashwin
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem with Running Query
@ 2007-04-09 16:07 Kris Jurka <books@ejurka.com>
parent: Bellur Ashwin <bell_ashwin@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2007-04-09 16:07 UTC (permalink / raw)
To: Bellur Ashwin <bell_ashwin@yahoo.com>; +Cc: pgsql-jdbc
On Fri, 6 Apr 2007, Bellur Ashwin wrote:
> I have modified my postgres code to accept queries starting with a word
> "My" followed by the query followed by the 1000 #separated values,
> inside postgres, i check for the word "My" at the beginning of the query
> if found, i will generate 1000 inserts into a table (these 1000 values
> are those i have sent after the query with the delimiter #), then
> execute the query which is in between "My" and #values,
>
> Example: My query would look like this
>
> My select * from xyz1 a, xyz2 b where a.a1=b.a1 #1#2#3...........
>
> Now my problem is when i try to send the new (appended) query to the
> JDBC, i get ArrayIndexOutOfBoundException: Index: 1 Size: 1 from the
> executeQuery function, here my query is reaching the postgres and is
> executing, but i am getting the exception in my JAVA Program
>
It certainly seems like an odd and non-standard thing to do so the JDBC
driver could easily get confused if you are returning many command
completion tags from a single query. A complete stacktrace and driver
version would be more useful than this vague error description.
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-04-09 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-06 16:57 Problem with Running Query Bellur Ashwin <bell_ashwin@yahoo.com>
2007-04-09 16:07 ` Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox