From: Jean-Baptiste Veslin <jean-baptiste.veslin@meteo.fr>
To: pgsql-bugs@postgresql.org
Subject: BUG #5812: ecpg problem with array of varchar when using dimension name with length > 12
Date: Tue, 4 Jan 2011 14:44:25 GMT
Message-ID: <201101041444.p04EiPZo068102@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 5812
Logged by: Jean-Baptiste Veslin
Email address: jean-baptiste.veslin@meteo.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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jean-baptiste.veslin@meteo.fr
Subject: Re: BUG #5812: ecpg problem with array of varchar when using dimension name with length > 12
In-Reply-To: <201101041444.p04EiPZo068102@wwwmaster.postgresql.org>
References: <201101041444.p04EiPZo068102@wwwmaster.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox