Re: ERROR: invalid datatype 'FILE' - Mailing list pgsql-novice

From Andrej
Subject Re: ERROR: invalid datatype 'FILE'
Date
Msg-id AANLkTi=oxyfLnyLjgca8Je38+B+UbLH-hbBgFcb8xwXZ@mail.gmail.com
Whole thread Raw
In response to ERROR: invalid datatype 'FILE'  (Amish <amish.pandya@in.com>)
Responses Re: ERROR: invalid datatype 'FILE'
List pgsql-novice
On 1 February 2011 20:03, Amish <amish.pandya@in.com> wrote:

> ERROR: invalid datatype 'FILE'
>
> Program Code
>
> #include <stdlib.h>
> #include <stdio.h>
>
> EXEC SQL BEGIN DECLARE SECTION;
> struct  rid_ds
> {
>        double de_re_rid;
>        double de_re_xrid;
>        FILE   *fp;
> } dbinfo_t;
> dbinfo_t dbval;
> EXEC SQL END DECLARE SECTION;
>
> main()
> {
>
>                printf("Test Program :\n");
>
> }
>
>
> Below is the command i use to compile the code.
>
> ecpg -c prog1.pgc
>
> prog1.pgc:9: ERROR: invalid datatype 'FILE'
>
> The same code compiles using esqlc without any problem. Is there any way to
> fix about error
>
> ECPG version:
>
> ecpg (PostgreSQL 8.2.13) 4.2.1
>
> RHEL 5 update 3

I have no idea what esqlc is, but I'll hazard a guess that it by
default includes
something that actually defines FILE.  FILE isn't defined in stdio.h
or stdlib.h,
for that matter, so I'm not really surprised that it won't compile.



Cheers,
Andrej

pgsql-novice by date:

Previous
From: Lew
Date:
Subject: Re: Primary keys in a single column table and text vs varchar
Next
From: Mladen Gogala
Date:
Subject: Re: ERROR: invalid datatype 'FILE'