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

Re: WIP: to_char, support for EEEE format

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: to_char, support for EEEE format
Date: 2009-07-30 16:57:44
Message-ID: 4A71D108.6020701@timbira.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Brendan Jurd escreveu:
> 2009/7/31 Euler Taveira de Oliveira <euler(at)timbira(dot)com>:
>> Brendan Jurd escreveu:
>>> Limiting to two exponent digits also has the nice property that the
>>> output always matches the length of the format pattern:
>>>
>>> 9.99EEEE
>>> 1.23E+02
>>>
>> I don't think neglecting to represent a valid number is a "nice property".
>> What does the length of format pattern have to do with output format?
> 
> Most of the format patterns in to_char() are chosen to match the
> length of their expected output.  The output of "DD" is two
> characters, "Mon" is three and so on.
> 
Brendan, the main point of to_*() functions is Oracle-compatibility. So let's
just do it. No matter it seems bizarre (like 999.99EEEE).

> That's why the scientific notation pattern is "EEEE" and not just "E".
> 
I don't know. Ask Oracle. ;) We don't need to bother with that. Let's just be
compatible.


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/

In response to

pgsql-hackers by date

Next:From: Joe ConwayDate: 2009-07-30 17:02:11
Subject: Re: CommitFest Status Summary - 2009-07-25
Previous:From: Tom LaneDate: 2009-07-30 16:46:43
Subject: Re: WIP: to_char, support for EEEE format

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