pgsql: Fix incorrect results for numeric data passed through an ECPG SQ

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect results for numeric data passed through an ECPG SQ
Date: 2018-11-13 20:46:32
Message-ID: E1gMfZw-0001Uo-5h@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ecfd5579561c3e720e696a42aadcd4b5b52aa581

Modified Files
--------------
src/interfaces/ecpg/ecpglib/sqlda.c | 34 +-
src/interfaces/ecpg/test/expected/sql-sqlda.c | 108 ++---
src/interfaces/ecpg/test/expected/sql-sqlda.stderr | 436 +++++++++++++--------
src/interfaces/ecpg/test/expected/sql-sqlda.stdout | 28 ++
src/interfaces/ecpg/test/sql/sqlda.pgc | 4 +-
5 files changed, 380 insertions(+), 230 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-11-13 21:16:04 pgsql: Add INSERT ON CONFLICT test on partitioned tables with transitio
Previous Message Tom Lane 2018-11-13 19:54:48 pgsql: Fix realfailN lexer rules to not make assumptions about input fo