Received: from mail-2.addcom.de (mail-2.addcom.de [62.96.128.36]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2S6xDw91520 for ; Wed, 28 Mar 2001 01:59:14 -0500 (EST) (envelope-from michael@fam-meskes.de) Received: (qmail 17467 invoked by uid 502); 28 Mar 2001 06:59:11 -0000 Received: from n-dialin-1818.addcom.de (HELO feivel.fam-meskes.de) (postfix@62.246.10.146) by mail-2.addcom.de with SMTP; 28 Mar 2001 06:59:11 -0000 Received: by feivel.fam-meskes.de (Postfix, from userid 1000) id BFD10A6028; Wed, 28 Mar 2001 08:51:58 +0200 (CEST) Date: Wed, 28 Mar 2001 08:51:58 +0200 From: Michael Meskes To: Mic Cc: pgsql-interfaces@postgresql.org Subject: Re: Datatypes in embedded SQL Message-ID: <20010328085158.B8183@feivel.fam-meskes.de> Mail-Followup-To: Mic , pgsql-interfaces@postgresql.org References: <985631638.19816.0.pluto.c29fe0e4@news.demon.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <985631638.19816.0.pluto.c29fe0e4@news.demon.nl>; from Mic.c@sloten.demon.nl on Mon, Mar 26, 2001 at 08:35:05PM +0200 X-Archive-Number: 200103/198 X-Sequence-Number: 1360 On Mon, Mar 26, 2001 at 08:35:05PM +0200, Mic wrote: > Thing is, I'm trying to declare a struct in the embedded SQL part in my C > program, but the preprocessor complains about an 'unknown data type in line > 162'. Is it not possible at all in Postgres to declare a structure? I tried Which data type are you using? It is possible to declare a struct inside the declare section. > writing out the DBstruct in the SQL DECLARE section, that didn't work > either. You have to write it out there or else the statement using the struct won't work because the preproc never saw the definition. > typedef struct { > int line_nr, > type; > char nick[10], > line[161]; > } DBstruct; That won't work. ECPG will not see this part of the code. Did you try the latest CVS version aka PostgreSQL 7.1? Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!