public inbox for [email protected]
help / color / mirror / Atom feedMapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE
2+ messages / 2 participants
[nested] [flat]
* Mapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE
@ 2023-11-18 01:19 Ben Horowitz <[email protected]>
2023-11-20 15:19 ` Re: Mapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE Dave Cramer <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Ben Horowitz @ 2023-11-18 01:19 UTC (permalink / raw)
To: [email protected]
Hi,
Apologies if this is a duplicate of an answered question. I searched in the
mailing list archives, Stack Overflow, etc., and didn't find anything.
At the line linked below in TypeInfoCache, it appears that type timestamptz
is getting mapped to the type java.sql.Types.TIMESTAMP [1] . It seems like
it should be mapped to java.sql.Types.TIMESTAMP_WITH_TIMEZONE.
TIMESTAMP_WITH_TIMEZONE was introduced in Java 8 (2014). Is the mapping of
timestamptz to TIMESTAMP intentional for reasons of backwards compatibility?
I found the behavior surprising, and also found a question on Stack
Overflow where someone else was surprised [2].
Thanks very much,
Ben
[1]
https://github.com/pgjdbc/pgjdbc/blob/65f158ed8e06ffea77ca7f3b8413847817a7831f/pgjdbc/src/main/java/...
[2]
https://stackoverflow.com/questions/60451102/for-postgresql-resultsetmetadata-getcolumntype-function...
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Mapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE
2023-11-18 01:19 Mapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE Ben Horowitz <[email protected]>
@ 2023-11-20 15:19 ` Dave Cramer <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2023-11-20 15:19 UTC (permalink / raw)
To: Ben Horowitz <[email protected]>; +Cc: [email protected]
Probably should be. Care to provide a Pull Request ?
Dave Cramer
www.postgres.rocks
On Fri, 17 Nov 2023 at 20:19, Ben Horowitz <[email protected]> wrote:
> Hi,
>
> Apologies if this is a duplicate of an answered question. I searched in
> the mailing list archives, Stack Overflow, etc., and didn't find anything.
>
> At the line linked below in TypeInfoCache, it appears that
> type timestamptz is getting mapped to the type java.sql.Types.TIMESTAMP [1]
> . It seems like it should be mapped to
> java.sql.Types.TIMESTAMP_WITH_TIMEZONE.
>
> TIMESTAMP_WITH_TIMEZONE was introduced in Java 8 (2014). Is the mapping of
> timestamptz to TIMESTAMP intentional for reasons of backwards compatibility?
>
> I found the behavior surprising, and also found a question on Stack
> Overflow where someone else was surprised [2].
>
> Thanks very much,
> Ben
>
> [1]
> https://github.com/pgjdbc/pgjdbc/blob/65f158ed8e06ffea77ca7f3b8413847817a7831f/pgjdbc/src/main/java/...
>
> [2]
> https://stackoverflow.com/questions/60451102/for-postgresql-resultsetmetadata-getcolumntype-function...
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-11-20 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-18 01:19 Mapping of timestamptz to TIMESTAMP vs. TIMESTAMP_WITH_TIMEZONE Ben Horowitz <[email protected]>
2023-11-20 15:19 ` Dave Cramer <[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