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

Re: Bug 1500

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: josh(at)agliodbs(dot)com, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>,List pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug 1500
Date: 2005-03-27 15:58:28
Message-ID: 5571.1111939108@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Karel Zak <zakkr(at)zf(dot)jcu(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-27 17:44:41
Subject: Making oidvector and int2vector variable-length
Previous:From: Karel ZakDate: 2005-03-27 11:03:33
Subject: Re: Bug 1500

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