Re: FWD: tinterval vs interval on pgsql-novice

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FWD: tinterval vs interval on pgsql-novice
Date: 2000-11-28 16:14:59
Message-ID: 19532.975428099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-11-28 16:19:45 AW: Please advise features in 7.1 (SUMMARY)
Previous Message Zeugswetter Andreas SB 2000-11-28 15:50:59 AW: Please advise features in 7.1 (SUMMARY)

Browse pgsql-novice by date

  From Date Subject
Next Message Thomas Lockhart 2000-11-28 16:23:10 Re: FWD: tinterval vs interval on pgsql-novice
Previous Message Tom Lane 2000-11-28 14:49:37 Re: FWD: tinterval vs interval on pgsql-novice