7.2 -> 7.3 timespan, interval etc.

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: 7.2 -> 7.3 timespan, interval etc.
Date: 2003-06-05 00:00:32
Message-ID: 1054771232.678.1.camel@billy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,

I want to switch one of our servers to 7.3.

Some of our projects (7.2) use timespan() which for example evaluates:

SELECT timespan('5 seconds');
interval
----------
@ 5 secs

In 7.3 there's only interval

SELECT '5 seconds'::interval;
interval
----------
00:00:05

I _think_ I never used the output of timespan as a result itself, but
rather to calculate some things.
However, maybe I did (couldn't check all the projects by now).

What then ?

- Can I have the old behaviour back ?

- Is it possible to have the timespan function back, so that I dont have
to replace all occurences of timespan to interval ?

- Can I have the output of timespan in the same format as before ? (I
like the new one better, but for compatibility reasons, there could be a
case where it would be much handier with the old format)

- Why was it taken away ? Did it 'hurt' ?

- What else was taken out ?

P.S.: I just read about CREATE DOMAIN ... AS ...
Is that what I want ?
Can I tell it to have the same output as before ?

TIA
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message chestie 2003-06-05 01:17:15 Re: Calculation error
Previous Message Tom Lane 2003-06-04 22:48:59 Re: locale support ?