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 | e1f25901268cd07095329ce2e705df1de244f913 (patch) | |
tree | 44a1d21ebbdcefb5c56f6d22c77df546ba5e9a53 /src/interfaces/ecpg/test/sql/sqlda.pgc | |
parent | 1a8bde490c982cbdd9d174e72d42f6042e9bf4ee (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; |