]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix handling of array of char pointers in ecpglib.
authorMichael Meskes <meskes@postgresql.org>
Tue, 6 May 2014 11:04:30 +0000 (13:04 +0200)
committerMichael Meskes <meskes@postgresql.org>
Tue, 6 May 2014 11:24:13 +0000 (13:24 +0200)
commit91c8c106facadc868308e90dbaca3ac6017be5f0
treed018fa4e327d7773cafd82c0c4df28dc8feb8781
parent7d5b6862180b3e2ef4c34d5f0d397ae5825acd71
Fix handling of array of char pointers in ecpglib.

When array of char * was used as target for a FETCH statement returning more
than one row, it tried to store all the result in the first element. Instead it
should dump array of char pointers with right offset, use the address instead
of the value of the C variable while reading the array and treat such variable
as char **, instead of char * for pointer arithmetic.

Patch by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/preproc/type.c