From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Richard Welty <rwelty(at)averillpark(dot)net> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: debugging prepared statements |
Date: | 2003-02-09 09:31:19 |
Message-ID: | Pine.LNX.4.33.0302090426570.29526-100000@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
From your original message it appears that either update_core_variables
should be set to one less, or you should use field_index++ instead of
++field_index.
You might also consider updating the JDBC driver at some point. The
Statement.toString method was recently corrected to display the actual
statement you're working on. This hasn't made it into any of the
prebuilt jar files on jdbc.postgresql.org, but perhaps soon.
Kris Jurka
On Fri, 7 Feb 2003, Richard Welty wrote:
> On Fri, 7 Feb 2003 08:32:51 -0500 (EST) Richard Welty <rwelty(at)averillpark(dot)net> wrote:
> > and the debug output. note that the toString() method on the prepared
> > statement just produces the string of "?null" values. what is interesting
> > is that there are 9 of them, and it is the ninth set which blows up.
>
> > statement: ?null?null?null?null?null?null?null?null?null
>
> what is interesting is that the insert, which is succeeding (or at least
> was until i broke it 5 minutes ago), has the following .toString() output:
>
> statement: ?null?null?null?null?null?null?null?null?null?null?null?null)
>
> which is the expected number of ? characters (12). the processing of the
> prepared statements for the update and the insert does indeed seem to be
> behaving differently.
>
> i don't see any material difference in the way that i construct the Insert
> prepared statement and the Update prepared statement except for the things
> required by SQL syntax.
>
> i left the environment information out of the previous posting:
>
> RedHat 7.3
> postgresql 7.2.1-5 from the rpm
> pgjdbc2.jar from the website late october of last year
> jdk 1.4.1_01
>
> thanks in advance for any help/advice,
> richard
> --
> Richard Welty rwelty(at)averillpark(dot)net
> Averill Park Networking 518-573-7592
> Unix, Linux, IP Network Engineering, Security
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Welty | 2003-02-09 14:10:41 | Re: debugging prepared statements |
Previous Message | Kris Jurka | 2003-02-09 09:21:29 | Re: patch for COPY |