From: | "Jean-Baptiste Veslin" <jean-baptiste(dot)veslin(at)meteo(dot)fr> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #5812: ecpg problem with array of varchar when using dimension name with length > 12 |
Date: | 2011-01-04 14:44:25 |
Message-ID: | 201101041444.p04EiPZo068102@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 5812
Logged by: Jean-Baptiste Veslin
Email address: jean-baptiste(dot)veslin(at)meteo(dot)fr
PostgreSQL version: 9.0.1
Operating system: linux CentOS 5.4
Description: ecpg problem with array of varchar when using dimension
name with length > 12
Details:
When using a variable to give dimension of an array of varchar, ecpg
products a coredump if the the variable name is longer than 12.
Exemple, this doesn't work because length of MAX_COL_IN_IND is 14 :
#define MAX_COL_IN_IND 10 #perhaps in an include file
(...)
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR col_name[MAX_COL_IN_IND][26];
EXEC SQL END DECLARE SECTION;
This problem seems to be because of the static declaration "char dim[14L]"
in ecpg.trailer
I think it wouldn't be very difficult to calculate the dimension of "dim"
dynamically (strlen(dimension) + 2)
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua Tolley | 2011-01-04 16:34:57 | Re: BUG #5809: bigserial duplicate value |
Previous Message | Jeff Davis | 2011-01-03 19:04:17 | Re: BUG #5809: bigserial duplicate value |