Problem with exec sql include - Mailing list pgsql-general

From Carmen Gloria Sepulveda Dedes
Subject Problem with exec sql include
Date
Msg-id 3FBB79B5.DF10D916@atichile.com
Whole thread Raw
Responses Re: Problem with exec sql include  (Michael Meskes <meskes@postgresql.org>)
List 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


pgsql-general by date:

Previous
From: "Rob Sell"
Date:
Subject: Re: Optimizing query
Next
From: Jan Wieck
Date:
Subject: Re: SuSE RPMs available for PostgreSQL 7.4