From: Jürgen Cappel <email@juergen-cappel.de>
To: pgsql-interfaces@postgresql.org
Subject: ECPG and structure declaration
Date: Sun, 21 Sep 2003 08:46:02 +0200
Message-ID: <JEEKIPNAKJNCFLMOBKHGKEFGDBAA.email@juergen-cappel.de> (raw)
ECPG and structure declaration
Hello,
why is the following code fragment an error for ecpg ?
---------------------------------------------
EXEC SQL BEGIN DECLARE SECTION;
struct base
{
char basekey [ 26 ];
};
EXEC SQL END DECLARE SECTION;
struct base b1[10];
struct base *b2;
---------------------------------------------
ecpg gives the error message:
demo.q:5: ERROR: syntax error at or near ";"
Versions:
- ecpg (PostgreSQL 7.3.3) 2.10.0
- Linux scaleo 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
My intention is to declare the structure type in an include file and
define arrays, pointers, etc from the declaration in various .c files.
What's wrong ?
Cheers,
Jürgen
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: email@juergen-cappel.de
Subject: Re: ECPG and structure declaration
In-Reply-To: <JEEKIPNAKJNCFLMOBKHGKEFGDBAA.email@juergen-cappel.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