Problem with exec sql include

From: Carmen Gloria Sepulveda Dedes <csepulveda(at)atichile(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with exec sql include
Date: 2003-11-19 14:09:58
Message-ID: 3FBB79B5.DF10D916@atichile.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.

I have a 2 files: test.h and test.pgc.

In test.h, I defined:

typedef struct {
long curid;
char curnombre[20];
char curfecha[10];
} struct_cursor;

And, in test.pgc, I want to declare:

EXEC SQL BEGIN DECLARE SECTION;
struct_cursor t_cursor;
EXEC SQL END DECLARE SECTION;

But, when I do: ecpg -I/<include_file_path> test.pgc,
I get: test.pgc:7: ERROR: invalid datatype 'struct_cursor'

I know that I can include the typedef at DECLARE SECTION, but I don't
want to use that (test.h and test.pgc are only examples of the problem
bigest).

How can I resolve this?

Thanks.

CG

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-19 14:49:06 Re: SuSE RPMs available for PostgreSQL 7.4
Previous Message Jan Wieck 2003-11-19 14:05:09 Re: SuSE RPMs available for PostgreSQL 7.4