Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 284721337B51 for ; Tue, 4 Jan 2011 10:44:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 06443-04 for ; Tue, 4 Jan 2011 14:44:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 72D171337B4F for ; Tue, 4 Jan 2011 10:44:25 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p04EiP3s068103 for ; Tue, 4 Jan 2011 14:44:25 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p04EiPZo068102; Tue, 4 Jan 2011 14:44:25 GMT (envelope-from www) Date: Tue, 4 Jan 2011 14:44:25 GMT Message-Id: <201101041444.p04EiPZo068102@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5812: ecpg problem with array of varchar when using dimension name with length > 12 From: "Jean-Baptiste Veslin" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201101/9 X-Sequence-Number: 29031 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)