From: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Date-Time dangling unit fix |
Date: | 2022-12-11 15:29:23 |
Message-ID: | CAAvxfHf2Q1gKLiHGnuPOiyf0ASvKUM4BnMfsXuwgtYEb_Gx0Zw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
Attached is a patch to fix a parsing error for date-time types that
allow dangling units in the input. For example,
`date '1995-08-06 m y d'` was considered a valid date and the dangling
units were ignored.
Intervals also suffer from a similar issue, but the attached patch
doesn't fix that issue. For example,
`interval '1 day second month 6 hours days years ago'` is parsed as a
valid interval with -1 days and -6 hours. I'm hoping to fix that in a
later patch, but it will likely be more complicated than the other
date-time fixes.
- Joe Koshakow
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Handle-dangling-units-in-date-time-input.patch | text/x-patch | 7.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Koshakow | 2022-12-11 15:41:27 | Re: Date-Time dangling unit fix |
Previous Message | Andrew Dunstan | 2022-12-11 14:35:40 | Re: Error-safe user functions |