Re: No Interval Conversion Function in 7.2?!!?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: No Interval Conversion Function in 7.2?!!?
Date: 2002-02-16 00:33:16
Message-ID: 17020.1013819596@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Josh Berkus" <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-02-16 00:55:17 Re: No Interval Conversion Function in 7.2?!!?
Previous Message Josh Berkus 2002-02-16 00:20:43 No Interval Conversion Function in 7.2?!!?