Re: Hrm. interval() function? - Mailing list pgsql-hackers

From Larry Rosenman
Subject Re: Hrm. interval() function?
Date
Msg-id 60740000.1047610947@lerlaptop.lerctr.org
Whole thread Raw
In response to Re: Hrm. interval() function?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers

--On Friday, March 14, 2003 10:52:46 +0800 Christopher Kings-Lynne 
<chriskl@familyhealth.com.au> wrote:

>> >> ler=# select interval('6 months');
>> >> ERROR:  parser: parse error at or near "'6 months'" at character 17
>> >> ler=# select interval('6 months'::text);
>> >> ERROR:  parser: parse error at or near "'6 months'" at character 17
>> >> ler=#
>> >
>> > Try:
>> >
>> > select "interval"('6 months');
>> >
>> That works, but is non-intuitive.  I assume this is a reserved word
>> issue?
>
> It's been like that since 7.2 introduced sql standard syntax for various
> timestmap things.
>
>> Can it be fixed?
>
> Nope - the correct way to use that function is this:
>
> select interval '6 months';
Drat, SQL gets me again :-).

Thanks,
LER

>
> Chris



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749





pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: Upgrading the backend's error-message infrastructure
Next
From: Tom Lane
Date:
Subject: Re: No merge sort?