ecpg: dtime_t vs timestamp

Поиск
Список
Период
Сортировка
От Paul Tilles
Тема ecpg: dtime_t vs timestamp
Дата
Msg-id 46D4385E.1000105@noaa.gov
обсуждение исходный текст
Ответы Re: ecpg: dtime_t vs timestamp  (Michael Meskes <meskes@postgresql.org>)
Список 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 по дате отправления:

Предыдущее
От: cluster
Дата:
Сообщение: Reliable and fast money transaction design
Следующее
От: Markus Schiltknecht
Дата:
Сообщение: Re: Bigtime scaling of Postgresql (cluster and stuff I suppose)