Skip site navigation (1) Skip section navigation (2)

Re: Bug 1500

From: lsunley(at)mb(dot)sympatico(dot)ca
To: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug 1500
Date: 2005-03-26 21:49:50
Message-ID: 0IDZ00G68E6XA4@l-daemon (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
This has my vote....


In <200503261404(dot)14979(dot)josh(at)agliodbs(dot)com>, on 03/26/05 
   at 02:04 PM, Josh Berkus <josh(at)agliodbs(dot)com> said:


>> > Yeah.  áKarel Zak, who wrote that code, is convinced we should remove it,
>> > but I don't think anyone else is ...
>>  áI think I was Peter and Josh Berkus who convinced me that the code is
>> bed. "we should remove..." is opinion only...

>I certainly didn't recommend removing it before we have a replacement

>The complaint, btw, was that the current to_char formats intervals as if
>they  were dates.   This results in some rather confusing output.   I
>wanted to  improve to_char to support proper interval formatting, but
>apparently it's  difficult to do that without breaking other aspects of
>to_char (at least, I  was told that).   

>What we need is a function or functions which do the following:

>SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI' ) || ' min'; 2600

>SELECT to_char( INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI' );

>SELECT to_char( INTERVAL '3 years 5 months','MM' ) || ' mons'; 41 mons

>etc.  This would be more sophisticated than the logic employed for the
>current  to_char, as the interval would be re-calculated in the units
>supplied,  limited by the month/year|day/hour/minute boundary.   


In response to

pgsql-hackers by date

Next:From: Josh BerkusDate: 2005-03-26 22:04:14
Subject: Re: Bug 1500
Previous:From: Oleg BartunovDate: 2005-03-26 21:35:36
Subject: Re: understanding pg_stat* numbers

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group