Re: Date-time extraneous fields with reserved keywords

2023-03-09 Thread Tom Lane
Joseph Koshakow writes: > Please see the attached patch with these changes. Pushed with a couple of cosmetic adjustments. regards, tom lane

Re: Date-time extraneous fields with reserved keywords

2023-03-07 Thread Keisuke Kuroda
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Thank you for the response and new patch. The scope of impac

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Joseph Koshakow
On Sat, Mar 4, 2023 at 2:48 PM Tom Lane wrote: > >Right. So really we ought to move the ValidateDate call as >well as the next half-dozen lines about "mer" down into >the subsequent "do additional checking" stanza. It's all >only relevant to normal date specs. > >BTW, looking

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Tom Lane
Joseph Koshakow writes: > On Sat, Mar 4, 2023 at 1:56 PM Tom Lane wrote: >> Why do you want to skip ValidateDate in some cases? If we've not >> had to do that before, I don't see why it's a good idea now. > This goes back to the abstraction break of > setting tmask without updating tm. Certain

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Joseph Koshakow
On Sat, Mar 4, 2023 at 1:56 PM Tom Lane wrote: > >I think we should tread very carefully about disallowing inputs that >have been considered acceptable for 25 years. I agree with disallowing >numeric fields along with 'epoch' and 'infinity', but for example >this seems perfectly u

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Tom Lane
Joseph Koshakow writes: > - I'm not sure if we should hard code in those > three specific reserved keywords or set tmask > in the default case. I think we should tread very carefully about disallowing inputs that have been considered acceptable for 25 years. I agree with disallowing numeri

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Joseph Koshakow
Attached is the described patch. I have two notes after implementing it: - It feels like a bit of an abstraction break to set tmask without actually setting any fields in tm. - I'm not sure if we should hard code in those three specific reserved keywords or set tmask in the default case

Re: Date-time extraneous fields with reserved keywords

2023-03-04 Thread Joseph Koshakow
On Sat, Mar 4, 2023 at 11:23 AM Keisuke Kuroda wrote: > >Good catch. >Of the reserved words that are special values of type Date/Time, >'now', 'today', 'tomorrow', 'yesterday', and 'allballs', >I get an error even before applying the patch. Thanks for pointing this out. After taki

Re: Date-time extraneous fields with reserved keywords

2023-03-02 Thread Keisuke Kuroda
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hi Joseph, Good catch. Of the reserved words that are specia

Date-time extraneous fields with reserved keywords

2022-12-11 Thread Joseph Koshakow
Hi all, Attached is a patch to fix another parsing error for date-time types that allow extraneous fields with certain reserved keywords. For example both `date '1995-08-06 epoch'` and `date 'today epoch'` were considered valid dates that both resolve to 1970-01-01. - Joe Koshakow From fb4c161aff