diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-11-13 15:46:08 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-11-13 15:46:08 -0500 |
commit | 32060f6780bc09595a12cea8c992493af3785a2a (patch) | |
tree | 51e47e6e51621cfbdcf40ee34a5058015a7a838c /src/interfaces/ecpg/test/sql/sqlda.pgc | |
parent | d1a2fa3d9901c1e8f6bba1cecbb4ecdd64f4849e (diff) |
Fix incorrect results for numeric data passed through an ECPG SQLDA.
Numeric values with leading zeroes were incorrectly copied into a
SQLDA (SQL Descriptor Area), leading to wrong results in ECPG programs.
Report and patch by Daisuke Higuchi. Back-patch to all supported
versions.
Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905C71161@g01jpexmbkw24
Diffstat (limited to 'src/interfaces/ecpg/test/sql/sqlda.pgc')
-rw-r--r-- | src/interfaces/ecpg/test/sql/sqlda.pgc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/test/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc index 8e3feaeb194..8b6843a4322 100644 --- a/src/interfaces/ecpg/test/sql/sqlda.pgc +++ b/src/interfaces/ecpg/test/sql/sqlda.pgc @@ -94,7 +94,9 @@ exec sql end declare section; exec sql insert into t1 values (1, 'a', 1.0, 1, 'a',1111111111111111111), (2, null, null, null, null,null), - (4, 'd', 4.0, 4, 'd',4444444444444444444); + (3, 'c', 0.0, 3, 'c',3333333333333333333), + (4, 'd', 4.0, 4, 'd',4444444444444444444), + (5, 'e', 0.001234, 5, 'e',5555555555555555555); strcpy(msg, "commit"); exec sql commit; |