Re: to_char(interval) --- done?

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Josh Berkus <josh(at)agliodbs(dot)com>, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: to_char(interval) --- done?
Date: 2003-03-26 16:46:30
Message-ID: 94370000.1048697190@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Wednesday, March 26, 2003 08:38:58 -0800 Josh Berkus
<josh(at)agliodbs(dot)com> wrote:

> Karel,
>
>> IMHO nobody use it -- maybe we can keep it in sources for 7.4 and
>> mark it in docs as deprecated and remove it in 7.5.
>
> This seems to be consistent with my informal survey on PGSQL-SQL and on
># postgresql. Nobody seems to be using the current behavior.
>
>> The date/time and numbers formatting share parser only. The current
>> to_char(interval) is 20 lines of code only.
>
> I'm not surprised.
>
>> I want to write new library "libformattig", because I need to_char()
>> features and some new extensions in the others projects -- it means
>> in 7.5 will new to_char() code. The current code works without bugs,
>> but it is not ideal code.
>
> Please call on me if you want any additional help formulating a
> specification. While I am not in any position to help with the code, I
> do use INTERVAL, TIMESTAMP, TIME and DATE heavily and have strong
> opinions about usability.
>
I had a need that should(!) be in the archives. Just to reiterate my need:

I input a contract length, in months, and wanted to get it back out as
months. There is no current way to do this, so I store it as an INT and
concatenate the word months to do the
date arithmetic.

Thanks all for the input, I suspect I will leave the coding to someone like
Karel that knows the backend better than I do, and also is a better coder
than I am.

> Thanks!
>
> --
> Josh Berkus
> Aglio Database Solutions
> San Francisco
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2003-03-26 16:50:36 Re: to_char(interval) --- done?
Previous Message Josh Berkus 2003-03-26 16:38:58 Re: to_char(interval) --- done?