Re: The same prepared query yield "-1" the first six times and then "-1.0"

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Edoardo Panfili <edoardo(dot)panfili(at)iisgubbio(dot)edu(dot)it>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
Date: 2023-08-21 18:57:28
Message-ID: CADK3HHLMwhfTQYkMqmbtht1KL85KxOdGLUHnwUrdAC5wUP8BVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 21 Aug 2023 at 12:46, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > Otherwise, I agree this seems like a bug, probably in the JDBC driver,
> > though one pertains to style as opposed to semantics since both answers
> are
> > technically correct.
>
> I don't see any such behavior change in psql, so I agree that this is
> probably something to ask about on the JDBC list.
>
> My first thought was that the output change occurs when the query
> transitions from custom to generic plan. However, since there are
> no parameters involved the backend would go for a generic plan
> immediately. Having said that, I seem to recall that the JDBC driver
> has its own notion of custom vs generic execution, so maybe the
> issue is around there somewhere.
>
> regards, tom lane
>
>
Tom,

It's because we also switch to binary at that point and don't parse text
any more. I agree though it shouldn't happen.

Dave

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2023-08-21 19:32:45 Re: The same prepared query yield "-1" the first six times and then "-1.0"
Previous Message Dave Cramer 2023-08-21 18:51:06 Re: JDBC + PG-15 but not psql