RE: [Bug Fix]ECPG: cancellation of significant digits on ECPG
Higuchi, Daisuke <higuchi.daisuke@jp.fujitsu.com>
From: "Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'Dmitry Dolgov' <9erthalion6@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-11-14T00:53:48Z
Lists: pgsql-hackers
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] >I took a quick look at this. Thank you for review. >So I think that we ought to unconditionally make the sqlda value's digit >buffer look just like the one we're copying, even when ndigits = 0, >which just requires removing the tests on ndigits. I agree with you. Seeing this thread[1], 'if (ndigits = 0)' was introduced only to avoid memcpy() crash. I do not know this solution was best or not, but no crash occurs in the current version. So, I also think 'if (ndigits = 0)' should be removed. >In short, the attached. Thank you for updating. This patch looks good to me. [1] https://www.postgresql.org/message-id/4EC825F3.5080504%40cybertec.at Regards, Daisuke Higuchi
Commits
-
Second try at fixing numeric data passed through an ECPG SQLDA.
- 06c723447b6b 12.0 landed
- f9e25ba14077 9.6.12 landed
- 68f30638a050 9.5.16 landed
- 41609776f2c2 9.4.21 landed
- 4618fdd67412 11.2 landed
- 2e8ed4659972 10.7 landed
-
Fix incorrect results for numeric data passed through an ECPG SQLDA.
- ecfd5579561c 12.0 landed
- e1f25901268c 9.6.12 landed
- be38945c6e66 9.5.16 landed
- 9e5e3861c782 9.4.21 landed
- 68393f3fd6b9 11.2 landed
- 32060f6780bc 10.7 landed