Skip site navigation (1) Skip section navigation (2)

Re: ERROR: invalid datatype 'FILE'

From: Andrej <andrej(dot)groups(at)gmail(dot)com>
To: Amish <amish(dot)pandya(at)in(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: ERROR: invalid datatype 'FILE'
Date: 2011-02-01 20:20:29
Message-ID: AANLkTi=oxyfLnyLjgca8Je38+B+UbLH-hbBgFcb8xwXZ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On 1 February 2011 20:03, Amish <amish(dot)pandya(at)in(dot)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

In response to

Responses

pgsql-novice by date

Next:From: AmishDate: 2011-02-02 03:55:00
Subject: Re: ERROR: invalid datatype 'FILE'
Previous:From: LewDate: 2011-02-01 18:59:44
Subject: Re: Primary keys in a single column table and text vs varchar

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group