X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C259DD1DAFB for ; Sun, 15 Feb 2004 13:42:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 96282-01 for ; Sun, 15 Feb 2004 09:42:33 -0400 (AST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by svr1.postgresql.org (Postfix) with ESMTP id 108D2D1DAA6 for ; Sun, 15 Feb 2004 09:42:24 -0400 (AST) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1AsMXY-0007sI-00 for pgsql-interfaces@postgresql.org; Sun, 15 Feb 2004 14:42:32 +0100 Received: from [80.142.186.34] (helo=fam-meskes.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1AsMXY-0006SY-00; Sun, 15 Feb 2004 14:42:32 +0100 Received: from feivel (feivel.fam-meskes.de [172.26.14.14]) by fam-meskes.de (Postfix) with ESMTP id 1F4A510EF3D; Sun, 15 Feb 2004 14:42:26 +0100 (CET) Received: by feivel (Postfix, from userid 1000) id 154484B11A; Sun, 15 Feb 2004 14:42:25 +0100 (CET) Date: Sun, 15 Feb 2004 14:42:25 +0100 From: Michael Meskes To: =?utf-8?Q?J=C3=BCrgen?= Cappel Cc: pgsql-interfaces Subject: Re: ECPG Segfault and variable usage question. Message-ID: <20040215134225.GA13602@1> Mail-Followup-To: =?utf-8?Q?J=C3=BCrgen?= Cappel , pgsql-interfaces References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i Content-Transfer-Encoding: quoted-printable X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:da5cff6069dd6897c77170232368d0ba X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/38 X-Sequence-Number: 4731 On Thu, Feb 12, 2004 at 08:00:12PM +0100, J=C3=BCrgen Cappel wrote: > this is a code snippet that causes ECPG to segfault. It's quite tricky I took this code as a.pgc and ran 'ecpg a.pgc' without any problem. Do you use any special options for ecpg? > Stack trace was obtained using a snapshot from about 2 weeks ago, ECPG fr= om > the 7.4.1 release segfaults also. Hmm, my 7.4.1 version also compiles this snippet cleanly. > Another problem that's giving me headaches trying to find a workaround for > is the following use of variables as data sources in INSERT/UPDATE > statements: >=20 > :myarray[index[10]] >=20 > Any comments, suggestions, hints ? Thanks a lot, Could you please try if the following patch helps you? --- /home/postgres/pgsql-ecpg/preproc/pgc.l 2003-12-29 14:53:04.000000000 += 0100 +++ pgc.l 2004-02-15 14:38:43.000000000 +0100 @@ -183,7 +183,7 @@ =20 identifier {ident_start}{ident_cont}* =20 -array ({ident_cont}|{whitespace}|[\+\-\*\%\/\(\)])* +array ({ident_cont}|{whitespace}|[\[\]\+\-\*\%\/\(\)])* typecast "::" =20 /* This will make it into CVS soon. Michael --=20 Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!