From: | Paul Tilles <Paul(dot)Tilles(at)noaa(dot)gov> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | ecpg: dtime_t vs timestamp |
Date: | 2007-08-28 14:59:42 |
Message-ID: | 46D4385E.1000105@noaa.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Neufeld | 2007-08-28 15:30:35 | Re: Read Access to database |
Previous Message | Lincoln Yeoh | 2007-08-28 14:53:29 | Re: Tables dissapearing |