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

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

pgsql-novice by date

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

pgsql-hackers by date

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

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