Re: No Interval Conversion Function in 7.2?!!? - Mailing list pgsql-sql

From Tom Lane
Subject Re: No Interval Conversion Function in 7.2?!!?
Date
Msg-id 17020.1013819596@sss.pgh.pa.us
Whole thread Raw
In response to No Interval Conversion Function in 7.2?!!?  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: No Interval Conversion Function in 7.2?!!?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> Please help!  I just upgraded a production database to PostgreSQL 7.2,
>  and discovered that INTERVAL() is no longer a function.  What replaced
>  it?  How can I convert VARCHAR to Interval?

It's still there, but INTERVAL is a reserved word these days.
"INTERVAL"(varcharvalue)
varcharvalue::interval
CAST(varcharvalue AS interval)

should all give the same results.  Only the last of these is actually
standard.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: No Interval Conversion Function in 7.2?!!?
Next
From: Tom Lane
Date:
Subject: Re: No Interval Conversion Function in 7.2?!!?