to_char(interval, text) deprecated in future - how do we get consistent interval output without it? - Mailing list pgsql-general

From SCassidy@overlandstorage.com
Subject to_char(interval, text) deprecated in future - how do we get consistent interval output without it?
Date
Msg-id OF9FBEF9BF.A5933372-ON88256F89.006A95AF-88256F89.006BB4F8@myoverland.net
Whole thread Raw
Responses Re: to_char(interval, text) deprecated in future - how do we get consistent interval output without it?
List pgsql-general
I saw the note in the docs that to_char(interval, text) is deprecated, and
will be removed.  I searched the archives and saw more mentions of this,
but no real explanation as to how it is planned for us to get consistent
output formatting when querying a column containing interval data.

For example, if you have data in an "interval" column, and just SELECT it
(without special formatting), you get things like:
 00:05:00
3 days
1 day 04:00:00
3 days 03:10:00

Currently, if I use something like:  to_char(t.estimated_time, 'DD
HH24:MI'),  I seem to get consistent results that my program can easily
deal with:

00 00:05
00 00:10
01 04:00
00 01:05
03 03:10

Can someone please explain if there is something else I should be using, or
what the plans actually are for handling this in future?  Should I just
store the value in seconds as an integer and handle everything myself?

Thanks,
Susan Cassidy




----------------------------------------------------------------------------------------------
See our award-winning line of tape and disk-based
backup & recovery solutions at http://www.overlandstorage.com
----------------------------------------------------------------------------------------------


pgsql-general by date:

Previous
From: Thomas Chille
Date:
Subject: speaks psql unicode?
Next
From: "Dann Corbit"
Date:
Subject: Re: PostgreSQL 8 on windows very slow