Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-novice by date

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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group