We have upgraded from Version 7.4.x to Version 8.2.4. In 7.4.x, we use the Informix compatibility functionality to use legacy code.
Our .pgc code looks as follows:

#include "Ice.h"

EXEC SQL include sqlda;
EXEC SQL include sqltypes;
EXEC SQL include sql3types;
EXEC SQL include pgtypes_timestamp;
EXEC SQL include pgtypes_date;
EXEC SQL include pgtypes_interval;
EXEC SQL include pgtypes_numeric;

EXEC SQL BEGIN DECLARE SECTION;
struct Ice_t
{
   char                lid[9];
   char                pe[3];
   short               dur;
   char                ts[3];
   char                extremum[2];
    dtime_t           obstime;
   double              value;
   char                shef_qual_code[2];
   long                quality_code;
   short               revision;
   char                product_id[11];
   dtime_t           producttime;
   dtime_t           postingtime;
}


The Ice.h header file includes the postgres datetime.h header file. The datetime.h file has the line "typedef timestamp dtime_t". Using Version 7.4.x, this worked. Now when we use Version 8.2.4 (which has an updated ecpg), this results in the message

ERROR:  invalid datatype  'dtime_t'

How should we fix this?

Paul Tilles

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

Reply via email to