pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] PR #3848: Fix updateRow() with OffsetTime and OffsetDataTime objects
2+ messages / 1 participants
[nested] [flat]

* [pgjdbc/pgjdbc] PR #3848: Fix updateRow() with OffsetTime and OffsetDataTime objects
@ 2025-10-25 08:53 "devs-lair (@devs-lair)" <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: devs-lair (@devs-lair) @ 2025-10-25 08:53 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

The documentation states that OffsetDateTime and OffsetTime must be used to work with time zone columns. TTIMETZ honestly stores the time zone. 

You can use the getObject(int, OffsetDataTime.class) method to obtain an OffsetDataTime class object, and everything works correctly. If you try to update a row with an object of this class (we update what we get), you'll get a ClassCastException. The SQL (UPDATE ...) query itself executes without error, and the data in the database itself is updated correctly. 

The error is specifically within PGResultSet.

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

1. [ ] Does your submission pass tests?
2. [x] Does `./gradlew styleCheck` pass ?
3. [ ] Have you added your new test classes to an existing test suite in alphabetical order?

### Changes to Existing Features:

* [ ] Does this break existing behaviour? If so please explain.
* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [x] Have you written new tests for your core changes, as applicable?
* [x] Have you successfully run tests with your changes locally?


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3848: Fix updateRow() with OffsetTime and OffsetDataTime objects
@ 2025-10-25 10:35 "devs-lair (@devs-lair)" <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: devs-lair (@devs-lair) @ 2025-10-25 10:35 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

it's fix: https://github.com/pgjdbc/pgjdbc/issues/3464

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-10-25 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-25 08:53 [pgjdbc/pgjdbc] PR #3848: Fix updateRow() with OffsetTime and OffsetDataTime objects "devs-lair (@devs-lair)" <[email protected]>
2025-10-25 10:35 Re: [pgjdbc/pgjdbc] PR #3848: Fix updateRow() with OffsetTime and OffsetDataTime objects "devs-lair (@devs-lair)" <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox