Re: Batch INSERT failing with error 22P02

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Batch INSERT failing with error 22P02
Дата
Msg-id Pine.BSO.4.64.0709201251280.22675@leary.csoft.net
обсуждение исходный текст
Ответ на Re: Batch INSERT failing with error 22P02  (Eric Faulhaber <ecf@goldencode.com>)
Ответы Re: Batch INSERT failing with error 22P02  (Eric Faulhaber <ecf@goldencode.com>)
Re: Batch INSERT failing with error 22P02  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc

On Thu, 20 Sep 2007, Eric Faulhaber wrote:

> What in the log file is indicating the use of an unspecified type to you?
> I'd like to investigate this further.

Whenever you see a DescribeStatement message that means the parameters
you've supplied for that row have at least one unresolved type.

21:29:08.469 (3)  FE=> Describe(statement=S_19)

The normal describe message is for describing a portal, meaning just the
resultset info while a statement describe will return information on what
parameter types the server side statement expects.

> Many thanks for a deep look into the log file and for a detailed description
> of what is going on.  Your analysis has given me some great insight which has
> led to a possible solution (see below).  Nevertheless, I'd still be
> interested to find out what triggered this change in behavior from version to
> version given my use case.
>

OK, I've got two approaches to figure out what's going on:

1) More type logging information.  This tries to figure our why we're
sending DescribeStatement and shows all the type info that goes into that
decision.  It also logs the results of DescribeStatement and when there is
a conflict the error now contains all the type info from before and after
the conflict.

2) Where's the unspecified type coming from?  I've put in a hack to the
driver to throw an exception when the first unspecified type is set which
should hopefully provide enough information to track it back to your
application.  Unspecified types are perfectly legal, so this isn't a real
problem, but it may be informational.


I've put up jar files and associated patches here:

http://www.ejurka.com/pgsql/jars/ecf/

For the unspecified type, the stacktrace alone should be fine.  For the
logging information, please rerun with loglevel=2 and upload just the last
10k lines of the file.

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Eric Faulhaber
Дата:
Сообщение: Re: Batch INSERT failing with error 22P02
Следующее
От: Eric Faulhaber
Дата:
Сообщение: Re: Batch INSERT failing with error 22P02