pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3497: refactor: factor out duplicated .getBytes() when converting date/time to Date/Time/Timestamp
Date: Fri, 24 Jan 2025 08:56:46 +0000
Message-ID: <[email protected]> (raw)
At best, we should avoid `byte[] -> String -> byte[]` conversions when dealing with datetime, however, currently PgCallableStatement uses getObject eagerly, so we lose the underlying wire format byte[] early.
That is why we have to use .toString() when converting to date. Ideally, we should keep the source byte[] data and convert it on request.
---
The change avoids `getBytes()` with the default encoding. I believe, date-time use limited alphabet, so the encoding should not matter much. However, the use of the default encoding was not the best choice.
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: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #3497: refactor: factor out duplicated .getBytes() when converting date/time to Date/Time/Timestamp
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox