ecpg: dtime_t vs timestamp - Mailing list pgsql-general

From Paul Tilles
Subject ecpg: dtime_t vs timestamp
Date
Msg-id 46D4385E.1000105@noaa.gov
Whole thread Raw
Responses Re: ecpg: dtime_t vs timestamp  (Michael Meskes <meskes@postgresql.org>)
List pgsql-general
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

pgsql-general by date:

Previous
From: cluster
Date:
Subject: Reliable and fast money transaction design
Next
From: Markus Schiltknecht
Date:
Subject: Re: Bigtime scaling of Postgresql (cluster and stuff I suppose)