Hi,

I built PostgreSQL 8.4.8 with the following patch,
then executed same program.

This result is same as psql's one.

--------------------------------------------------
testdb=# SELECT * FROM double_table;
        c1
-------------------
    12345678901234
   1234567890.1234
  0.12345678901234
   123456789012345
  1234567890.12345
 0.123456789012345
(6 rows)
--------------------------------------------------


*** execute.c.org       2011-04-15 12:17:14.000000000 +0900
--- execute.c   2011-07-16 19:46:05.000000000 +0900
***************
*** 709,720 ****
                                        strcpy(mallocedval, "array [");

                                        for (element = 0; element < asize; 
element++)
!                                               sprintf(mallocedval + 
strlen(mallocedval), "%.14g,", ((double *) var->value)[element]);

                                        strcpy(mallocedval + 
strlen(mallocedval) - 1, "]");
                                }
                                else
!                                       sprintf(mallocedval, "%.14g", *((double 
*) var->value));

                                *tobeinserted_p = mallocedval;
                                break;
--- 709,720 ----
                                        strcpy(mallocedval, "array [");

                                        for (element = 0; element < asize; 
element++)
!                                               sprintf(mallocedval + 
strlen(mallocedval), "%.15g,", ((double *) var->value)[element]);

                                        strcpy(mallocedval + 
strlen(mallocedval) - 1, "]");
                                }
                                else
!                                       sprintf(mallocedval, "%.15g", *((double 
*) var->value));

                                *tobeinserted_p = mallocedval;
                                break;

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to