Re: Re: FWD: tinterval vs interval on pgsql-novice

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: FWD: tinterval vs interval on pgsql-novice
Date: 2000-11-28 17:16:47
Message-ID: Pine.LNX.4.21.0011281813330.1014-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

Tom Lane writes:

> 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 ...

The OVERLAPS special SQL-construct is converted into the 'select
overlaps(...)' function call, which isn't allowed because OVERLAPS is a
keyword. *That* is where the parse error is coming from.

To fix this you simply need to double-quote "overlaps" when it's used as a
straight function call. See how substring does it in pg_proc.h.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-11-28 17:20:48 Re: FWD: tinterval vs interval on pgsql-novice
Previous Message Zeugswetter Andreas SB 2000-11-28 17:11:53 AW: Please advise features in 7.1 (SUMMARY)

Browse pgsql-novice by date

  From Date Subject
Next Message Thomas Lockhart 2000-11-28 17:20:48 Re: FWD: tinterval vs interval on pgsql-novice
Previous Message Thomas Lockhart 2000-11-28 16:23:10 Re: FWD: tinterval vs interval on pgsql-novice