Re: Bug 1500 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug 1500
Date
Msg-id 5571.1111939108@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug 1500  (Karel Zak <zakkr@zf.jcu.cz>)
Responses Re: Bug 1500
List pgsql-hackers
Karel Zak <zakkr@zf.jcu.cz> writes:
> Hmm, if we want to support conversion like:
>     '43 hours 20 minutes' --> 'MI min'
> how we should work with calendar INTERVAL units? For example 'month'?
>     '1 month 1 day' --> 'D days'
> I think answer should be error message: "missing calendar unit 'month'
> in output format"

Surely not.  to_char for timestamps doesn't require that you output
every field of the value, and it shouldn't require that for intervals
either.

regression=# select to_char(now(), 'MI "min"');to_char
---------58 min
(1 row)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: Bug 1500
Next
From: Tom Lane
Date:
Subject: Making oidvector and int2vector variable-length