Re: FWD: tinterval vs interval on pgsql-novice - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FWD: tinterval vs interval on pgsql-novice
Date
Msg-id 19532.975428099@sss.pgh.pa.us
Whole thread Raw
In response to Re: FWD: tinterval vs interval on pgsql-novice  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Responses Re: Re: FWD: tinterval vs interval on pgsql-novice  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> I see it does fail, but I'm at a complete loss to understand why,
>> especially given that the first case still works.  The grammar looks
>> perfectly fine AFAICT.  Can you explain what's wrong here?

> Here is what I'm planning on doing (already tested, but not committed).
> I'm adding some productions to the func_name rule in gram.y to handle
> the various "stringy operators" such as LIKE and OVERLAPS. These tokens
> will also be allowed in the ColLabel rule (as several are already).
> This fixes the immediate problem, and makes LIKE handling more
> consistant with other special functions. Comments?

That all sounds fine, but it doesn't seem to fix the problem I'm looking
at, which is that the OVERLAPS production is broken in current sources:

template1=# select ('today', 'tomorrow') OVERLAPS ('yesterday', 'now');overlaps
----------t
(1 row)

template1=# select ('today', interval '1 day') OVERLAPS ('yesterday', interval
'18 hours');
ERROR:  parser: parse error at or near "overlaps"

I don't understand why we're getting a parse error here ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: FWD: tinterval vs interval on pgsql-novice
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: Please advise features in 7.1 (SUMMARY)