pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPossible old and fixed bug in Postgres?
6+ messages / 4 participants
[nested] [flat]
* Possible old and fixed bug in Postgres?
@ 2023-04-05 09:18 Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Re: Possible old and fixed bug in Postgres? Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 6+ messages in thread
From: Steve Rogerson @ 2023-04-05 09:18 UTC (permalink / raw)
To: pgsql-general list <pgsql-general@lists.postgresql.org>
I was looking at perl CPAN Module (DateTime::Format::Pg) and saw that it did
something that seemed odd to me with time zones, based on the comment:
# For very early and late dates, PostgreSQL always returns times in
# UTC and does not tell us that it did so.
Early is before 1901-12-14 and late after 2038-01-18
A quick test setting my time zone to be America/Chicago I got
select '1900-01-01 00:00:00'::timestamptz;
timestamptz
------------------------
1900-01-01 00:00:00-06
(1 row)
and
select '2040-01-01 00:00:00'::timestamptz;
timestamptz
------------------------
2040-01-01 00:00:00-06
These seemed correct to me. I'm guessing this might have been a bug/feature of
pg in the long ago.
Steve
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Possible old and fixed bug in Postgres?
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
@ 2023-04-05 10:23 ` Erik Wienhold <ewie@ewie.name>
2023-04-05 14:16 ` Re: Possible old and fixed bug in Postgres? Tom Lane <tgl@sss.pgh.pa.us>
2023-04-05 15:02 ` Re: Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
0 siblings, 2 replies; 6+ messages in thread
From: Erik Wienhold @ 2023-04-05 10:23 UTC (permalink / raw)
To: Steve Rogerson <steve.git@woodsideendurance.co.uk>; pgsql-general list <pgsql-general@lists.postgresql.org>
> On 05/04/2023 11:18 CEST Steve Rogerson <steve.git@woodsideendurance.co.uk> wrote:
>
> I was looking at perl CPAN Module (DateTime::Format::Pg) and saw that it did
> something that seemed odd to me with time zones, based on the comment:
>
> # For very early and late dates, PostgreSQL always returns times in
> # UTC and does not tell us that it did so.
>
> Early is before 1901-12-14 and late after 2038-01-18
>
> A quick test setting my time zone to be America/Chicago I got
>
> select '1900-01-01 00:00:00'::timestamptz;
> timestamptz
> ------------------------
> 1900-01-01 00:00:00-06
> (1 row)
>
> and
>
> select '2040-01-01 00:00:00'::timestamptz;
> timestamptz
> ------------------------
> 2040-01-01 00:00:00-06
>
>
> These seemed correct to me. I'm guessing this might have been a bug/feature of
> pg in the long ago.
Judging by the commit message and changed test cases, probably:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=921d749bd4c34c3349f1c254d5faa2f1cec03...
--
Erik
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Possible old and fixed bug in Postgres?
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Re: Possible old and fixed bug in Postgres? Erik Wienhold <ewie@ewie.name>
@ 2023-04-05 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 6+ messages in thread
From: Tom Lane @ 2023-04-05 14:16 UTC (permalink / raw)
To: Erik Wienhold <ewie@ewie.name>; +Cc: Steve Rogerson <steve.git@woodsideendurance.co.uk>; pgsql-general list <pgsql-general@lists.postgresql.org>
Erik Wienhold <ewie@ewie.name> writes:
>> On 05/04/2023 11:18 CEST Steve Rogerson <steve.git@woodsideendurance.co.uk> wrote:
>> # For very early and late dates, PostgreSQL always returns times in
>> # UTC and does not tell us that it did so.
>> Early is before 1901-12-14 and late after 2038-01-18
>> ...
>> These seemed correct to me. I'm guessing this might have been a bug/feature of
>> pg in the long ago.
> Judging by the commit message and changed test cases, probably:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=921d749bd4c34c3349f1c254d5faa2f1cec03...
I think this was not fixed in full until 2008:
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=0171e72d4da2da7974ff13c63...
Either way, though, whatever Steve is looking at is far past its
sell-by date.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Possible old and fixed bug in Postgres?
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Re: Possible old and fixed bug in Postgres? Erik Wienhold <ewie@ewie.name>
@ 2023-04-05 15:02 ` Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 15:04 ` Re: Possible old and fixed bug in Postgres? Ian Lawrence Barwick <barwick@gmail.com>
2023-04-05 15:07 ` Re: Possible old and fixed bug in Postgres? Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 2 replies; 6+ messages in thread
From: Steve Rogerson @ 2023-04-05 15:02 UTC (permalink / raw)
To: pgsql-general list <pgsql-general@lists.postgresql.org>
On 05/04/2023 11:23, Erik Wienhold wrote:
> Judging by the commit message and changed test cases, probably:
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=921d749bd4c34c3349f1c254d5faa2f1cec03...
>
That's the one. I can't see which pg version(s) this turned up in.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Possible old and fixed bug in Postgres?
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Re: Possible old and fixed bug in Postgres? Erik Wienhold <ewie@ewie.name>
2023-04-05 15:02 ` Re: Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
@ 2023-04-05 15:04 ` Ian Lawrence Barwick <barwick@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Ian Lawrence Barwick @ 2023-04-05 15:04 UTC (permalink / raw)
To: Steve Rogerson <steve.git@woodsideendurance.co.uk>; +Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
2023年4月6日(木) 0:02 Steve Rogerson <steve.git@woodsideendurance.co.uk>:
>
> On 05/04/2023 11:23, Erik Wienhold wrote:
> > Judging by the commit message and changed test cases, probably:
> >
> > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=921d749bd4c34c3349f1c254d5faa2f1cec03...
> >
> That's the one. I can't see which pg version(s) this turned up in.
$ git tag --contains 921d749bd4c34c3349f1c254d5faa2f1cec03911 | head -1
REL8_0_0
Regards
Ian Barwick
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Possible old and fixed bug in Postgres?
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Re: Possible old and fixed bug in Postgres? Erik Wienhold <ewie@ewie.name>
2023-04-05 15:02 ` Re: Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
@ 2023-04-05 15:07 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 6+ messages in thread
From: Tom Lane @ 2023-04-05 15:07 UTC (permalink / raw)
To: Steve Rogerson <steve.git@woodsideendurance.co.uk>; +Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Steve Rogerson <steve.git@woodsideendurance.co.uk> writes:
> That's the one. I can't see which pg version(s) this turned up in.
The pg_time_t change was in 8.0, the later one to support 64-bit tzdata
was in 8.4.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-04-05 15:07 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 09:18 Possible old and fixed bug in Postgres? Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 10:23 ` Erik Wienhold <ewie@ewie.name>
2023-04-05 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-04-05 15:02 ` Steve Rogerson <steve.git@woodsideendurance.co.uk>
2023-04-05 15:04 ` Ian Lawrence Barwick <barwick@gmail.com>
2023-04-05 15:07 ` Tom Lane <tgl@sss.pgh.pa.us>
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