Brendan Jurd escreveu: > 2009/4/26 Brendan Jurd <dire...@gmail.com>: >> I've done some work updating Pavel's sci notation patch for to_char(). > > That patch again, now with a couple of minor tweaks to make it apply > cleanly against the current HEAD. > Here is my review. The patch applied without problems. The docs and regression tests are included. Both of them worked as expected. Also, you included a fix in RN format, do it in another patch.
The behavior is not the same as Oracle. Oracle accepts an invalid scientific notation '999.9EEEE'. Will we support it too? I think so. euler=# SELECT to_char(1234.56789, '999.9EEEE'); ERRO: invalid format for scientific notation DETALHE: "EEEE" requires exactly one digit before the decimal point. DICA: For example, "9.999EEEE" is a valid format. TO_CHAR(1234.56789,'999.9EEEE') ------------------------------- 1.2E+03 1 rows selected The '9.999eeee' format error message is misleading. euler=# select to_char(123, '9.999eeee'); ERRO: cannot use "EEEE" twice You could include an example in manual too. You could add the two failing cases above in regression tests too. -- Euler Taveira de Oliveira http://www.timbira.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers