pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: 姜梦洋 <minesunny@icloud.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: the same time value return different values,is it a problem
Date: Wed, 13 Sep 2023 10:17:28 -0400
Message-ID: <2961695.1694614648@sss.pgh.pa.us> (raw)
In-Reply-To: <9831C223-91ED-43FC-8223-B90C46BA77C4@icloud.com>
References: <9831C223-91ED-43FC-8223-B90C46BA77C4@icloud.com>

=?utf-8?B?5aec5qKm5rSL?= <minesunny@icloud.com> writes:
> 	I find the time type accuracy of the database. Using PreparedStatement, the accuracy found out for the sixth time is different from the first five times. This number is exactly the same as the threshold of the PreparedStatement. I can understand that the database can optimize PreparedStatements and reduce repeated parsing and other unnecessary operations. but I don’t quite understand how such processing will affect the execution results(Or maybe I don’t have a deep understanding of PreparedStatement.).

If you're using JDBC, this is probably the same effect discussed at

https://www.postgresql.org/message-id/flat/CAKyg5Sj%3D85niw8%3DZhX-quHaCQTPhG40REi1s%2BHYF6Snz4Dfi7Q...

It's got something to do with retrieving the query results in binary
mode instead of text.  The query result at the server is the same,
but the JDBC driver is rendering it differently.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <2961695.1694614648@sss.pgh.pa.us>
Permalink:  ../2961695.1694614648@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2961695.1694614648@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, minesunny@icloud.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: the same time value return different values,is it a problem
  In-Reply-To: <2961695.1694614648@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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