Re: [HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Thomas Lockhart
> > 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. > Hmm. Why was this required for the substring() example? afaik all of > this should be handled (correctly) in the grammar... I see it now. Will look

Re: [HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Thomas Lockhart
> 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. Hmm. Why was this required for the substring() example? afaik all of this should be handled (correctly) in the grammar... - Thomas

Re: [HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Peter Eisentraut
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 o

[HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Thomas Lockhart
Tom Lane wrote: > > Thomas Lockhart <[EMAIL PROTECTED]> 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

[HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> 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 test

[HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Thomas Lockhart
> Thomas Lockhart <[EMAIL PROTECTED]> writes: > > select ('today', interval '1 day') OVERLAPS ('yesterday', interval '18 > > hours'); > > (the second one fails). Now that I look, this breakage was introduced in > > March when "we" expunged operators allowed as identifiers (Tom Lane and > > I hav

[HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-28 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > select ('today', interval '1 day') OVERLAPS ('yesterday', interval '18 > hours'); > (the second one fails). Now that I look, this breakage was introduced in > March when "we" expunged operators allowed as identifiers (Tom Lane and > I have blood on

Re: [HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-27 Thread Thomas Lockhart
> (the second one fails). Now that I look, this breakage was introduced in > March when "we" expunged operators allowed as identifiers (Tom Lane and > I have blood on our hands on this one ;) See gram.y around line 5409. > Suggestions? Any problems with allowing OVERLAPS and BETWEEN as function n

[HACKERS] Re: FWD: tinterval vs interval on pgsql-novice

2000-11-27 Thread Thomas Lockhart
> > Thomas Lockhart would be the authority on this, but my impression is > > that tinterval is deprecated and will eventually go away in favor of > > the SQL-standard interval type. If you've found functions that exist > > for tinterval and not for interval, then that's an item for the TODO > > l