pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
No Interval Conversion Function in 7.2?!!?
3+ messages / 2 participants
[nested] [flat]

* No Interval Conversion Function in 7.2?!!?
@ 2002-02-16 00:20 Josh Berkus <josh@agliodbs.com>
  2002-02-16 00:33 ` Re: No Interval Conversion Function in 7.2?!!? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Josh Berkus @ 2002-02-16 00:20 UTC (permalink / raw)
  To: pgsql-sql

Folks,

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?

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: No Interval Conversion Function in 7.2?!!?
  2002-02-16 00:20 No Interval Conversion Function in 7.2?!!? Josh Berkus <josh@agliodbs.com>
@ 2002-02-16 00:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  2002-02-16 00:55   ` Re: No Interval Conversion Function in 7.2?!!? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2002-02-16 00:33 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: No Interval Conversion Function in 7.2?!!?
  2002-02-16 00:20 No Interval Conversion Function in 7.2?!!? Josh Berkus <josh@agliodbs.com>
  2002-02-16 00:33 ` Re: No Interval Conversion Function in 7.2?!!? Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-02-16 00:55   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-02-16 00:55 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; pgsql-sql

I said:
> 	"INTERVAL"(varcharvalue)

Sigh, that one should be

	"interval"(varcharvalue)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-02-16 00:55 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-16 00:20 No Interval Conversion Function in 7.2?!!? Josh Berkus <josh@agliodbs.com>
2002-02-16 00:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-02-16 00:55   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox