I have a header file that gets included by both C/C++ code and ecpg code. In this header are a few structs that get used by both code (C/C++ and ecpg). In order to get this to work for Informix, we had to do something like this in the header file:


#ifdef TFLG
EXEC SQL BEGIN DECLARE SECTION
#endif

struct definitions

#ifdef TFLG
EXEC SQL END DECLARE SECTION
#endif

I use the EXEC SQL INCLUDE headerfile statement in my ecpg code, but of course, not the C/C++ code.

I believe the TFLG macro gets defined by the Informix precompiler (though I have not been able to verify this). I also have not been able to find any sort of PostGres counterpart.

I am using the Informix compatibility switch when compiling ecpg, but do not get a successful compile (with a number of compile variations attempted). Does anyone know how to implement such a design? Is there a PostGres macro that is basically the same thing or is there another method I may be able to use?

Thanks,

Tom



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to