From: Michael Meskes <meskes@postgresql.org>
To: Mic <Mic.c@sloten.demon.nl>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Datatypes in embedded SQL
Date: Wed, 28 Mar 2001 08:51:58 +0200
Message-ID: <20010328085158.B8183@feivel.fam-meskes.de> (raw)
In-Reply-To: <985631638.19816.0.pluto.c29fe0e4@news.demon.nl>
References: <985631638.19816.0.pluto.c29fe0e4@news.demon.nl>
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!
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: meskes@postgresql.org, Mic.c@sloten.demon.nl
Subject: Re: Datatypes in embedded SQL
In-Reply-To: <20010328085158.B8183@feivel.fam-meskes.de>
* 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