Skip site navigation (1) Skip section navigation (2)

Re: Batch INSERT failing with error 22P02

From: Kris Jurka <books(at)ejurka(dot)com>
To: Eric Faulhaber <ecf(at)goldencode(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Batch INSERT failing with error 22P02
Date: 2007-09-21 06:43:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

On Thu, 20 Sep 2007, Kris Jurka wrote:

> For the logging information, please rerun with loglevel=2 and upload 
> just the last 10k lines of the file.

OK, with that info I'v finally managed to generate a reproducible test 
case (attached).  What happens is the driver sends:

Parse S_1
Describe S_1
Parse S_2

and when we get the results of S_1's describe we assign it to S_2 
because there's only one active query at any time.  So we've prepared 
S_2 with one set of parameters, but now it thinks it was prepared with 
S_1's.  So next time we do:

Describe S_2

We get describe results which come from the server and have what S_2 was 
parsed with and that doesn't match up with what the driver has for S_2 and 
it bails out.

So the fix is probably to check that we aren't setting type information 
from stale results, but this is a pretty complicated area, so I'd like to 
study it a little more.

In any case, thanks for your help in tracking this one down.

Kris Jurka

Description: text/plain (791 bytes)
Attachment: log.txt
Description: text/plain (4.1 KB)

In response to


pgsql-jdbc by date

Next:From: Eric FaulhaberDate: 2007-09-21 16:50:01
Subject: Re: Batch INSERT failing with error 22P02
Previous:From: Kris JurkaDate: 2007-09-20 19:38:44
Subject: Re: Batch INSERT failing with error 22P02

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group