Re: FF3 vs MS Date/Time Template - ERROR: date/time field value out of range

From: Nick Davies <Nick(dot)Davies(at)iliad-solutions(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: FF3 vs MS Date/Time Template - ERROR: date/time field value out of range
Date: 2024-12-09 09:16:37
Message-ID: AM8PR08MB6356ED063DE822D6D03D8943B63C2@AM8PR08MB6356.eurprd08.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you so much, that's a seriously speedy turnaround.

Regards

Nick

________________________________
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: 07 December 2024 17:49
To: Nick Davies <Nick(dot)Davies(at)iliad-solutions(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: FF3 vs MS Date/Time Template - ERROR: date/time field value out of range

Nick Davies <Nick(dot)Davies(at)iliad-solutions(dot)com> writes:
> In the docs it appears the 'MS' and 'FF3' date time template patterns are identical but the behaviour is different. We also support Oracle which doesn't have 'MS', so we tried to use the pattern 'YYYYMMDDHH24MISSFF3'. This doesn't work, but switching to 'MS' does.

Thanks for the report! The problem seems to be that the FFn codes are
mislabeled with is_digit = false. That causes the preceding SS code
to think that it should eat all the remaining digits, so we end with
seconds = 33123 which of course results in an error.

I went through the other format codes to look for similar errors and
didn't see any.

regards, tom lane

This message is private and confidential. It must not be distributed without our consent. If you have received this message in error, please notify us immediately, remove it from your system and do not disclose, distribute or retain this e-mail or any part of it. Unless expressly stated, opinions in this e-mail are those of the individual author and not those of Iliad Solutions , its directors or officers or any of its subsidiaries. You must take full responsibility for virus checking this e-mail and any attachments. Please note that the content of this e-mail or any of its attachments may also contain personal data that falls within the scope of the Data Protection Act 2018 and the General Data Protection Regulation. You must ensure that any handling or processing of such data by you is fully compliant with these legal and regulatory requirements.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-12-09 11:23:51 BUG #18742: /src/backend/rewrite/rewriteHandler.c
Previous Message Tender Wang 2024-12-09 02:56:50 Re: BUG #18741: Detaching a partition referencing a partitioned table fails with a trigger-related error