]> granicus.if.org Git - postgresql/commit
Fix incorrect results for numeric data passed through an ECPG SQLDA.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 13 Nov 2018 20:46:08 +0000 (15:46 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 13 Nov 2018 20:46:08 +0000 (15:46 -0500)
commitbe38945c6e661cb1d14a3295f4c7608a169f56f3
tree6f4d0de988977136c2d4ecb4c45b3b3a846fea7f
parent92dbbe90c9d64db96d8df77d3edc933efd198142
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
src/interfaces/ecpg/ecpglib/sqlda.c
src/interfaces/ecpg/test/expected/sql-sqlda.c
src/interfaces/ecpg/test/expected/sql-sqlda.stderr
src/interfaces/ecpg/test/expected/sql-sqlda.stdout
src/interfaces/ecpg/test/sql/sqlda.pgc