Re: ECPG and structure declaration

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Jürgen Cappel <email(at)juergen-cappel(dot)de>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG and structure declaration
Date: 2003-09-22 06:33:46
Message-ID: 20030922063346.GA3480@feivel.fam-meskes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Sun, Sep 21, 2003 at 08:46:02AM +0200, Jürgen Cappel wrote:
> 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;

Because the struct is not used to define a variable.

The next release will be able to correctly parse this kind of definition
itself, but until then you have to list the whole struct definition
when defining the variable.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Paulo Scardine 2003-09-22 17:53:45 Re: Killing the backend to cancel a long waiting query
Previous Message Mayank Goyal 2003-09-22 04:22:55 Need information for C++ interface