From: | "Poul Jensen" <flyvholm(at)gfy(dot)ku(dot)dk> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | ECPG: Structure definitions in header files |
Date: | 2005-02-04 21:11:28 |
Message-ID: | 000001c50afe$1ae7b190$b81ee589@flyvholm |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I'm aiming to build a database containing meta-data for a lot of raw data
files. A system of C programs are used to read the raw data files, and the
specific parameters I want to put in my database are stored in a few
structures. The structures are defined in header files. Here are a couple of
problems I encounter:
1) I first include the relevant header files with an EXEC SQL INCLUDE
statement and then declare them in an EXEC SQL DECLARE section, but when
meeting the structures in the DECLARE section, ECPG returns an 'invalid
datatype' error:
I can copy the structure definition from the header file and paste it into
the DECLARE section to avoid this, but that's not a very elegant solution,
and I thought the EXEC SQL INCLUDE command existed to avoid this. Does the
structure definition really have to be in the DECLARE section explicitly,
and if so, what is the EXEC SQL INCLUDE command supposed to be good for? (
Note: I am a novice to C as well! :-| )
2) Unfortunately, one of the structures contains a multidimensional array:
int16 lag[LAG_SIZE][2];
This causes the following error message from ECPG: "No multidimensional
array support for simple data types". Does that mean I cannot use anything
in this structure without redefining it (split the multidimensional array)
or copy everything to different variables? I don't want to redefine it since
it is used by a number of other programs.
Thanks a lot in advance!!!
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Cuenca | 2005-02-04 21:37:13 | pg_hba.cong edit |
Previous Message | William Yu | 2005-02-04 19:27:58 | Re: Temp table exists test?? |