Thread: No Interval Conversion Function in 7.2?!!?
Folks, Please help! I just upgraded a production database to PostgreSQL 7.2,and discovered that INTERVAL() is no longer a function. What replacedit? How can I convert VARCHAR to Interval? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
"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
I said: > "INTERVAL"(varcharvalue) Sigh, that one should be "interval"(varcharvalue) regards, tom lane