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

Re: Bug 1500

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: josh(at)agliodbs(dot)com
Cc: 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 11:03:33
Message-ID: 1111921413.2388.121.camel@petra (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, 2005-03-27 at 12:03 +0200, Karel Zak wrote:
> On Sat, 2005-03-26 at 15:56 -0800, Josh Berkus wrote:
> > Alvaro,
> > 
> > > On Sat, Mar 26, 2005 at 02:04:14PM -0800, Josh Berkus wrote:
> > > > SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI' ) || ' min';
> > > > 2600 min
> > >
> > > Hmm, what if you wanted more than one literal string?  Say "1 mon 3
> > > days" ... your concatenation idea wouldn't work.  ISTM the format string
> > > should allow unconverted literals, so you would use
> > >
> > > SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI min' );
>
> Well, I'm going to check how difficult will be implement correct to_char
> (interval).

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"

	Karel
-- 
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-27 15:58:28
Subject: Re: Bug 1500
Previous:From: Karel ZakDate: 2005-03-27 10:03:52
Subject: Re: Bug 1500

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