From: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Datum should be defined outside postgres.h |
Date: | 2007-10-25 15:18:00 |
Message-ID: | 4720B3A8.4010406@sun.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> I fixed it for zic, but problem with ecpg is that it includes
>> nodes/primnodes.h and it requires Datum type definition which is defined
>> in postgres.h. :(
>
> Why in the world is ecpg including either primnodes.h or postgres.h?
The problem is that ecpg shares parser.c source code and this code
includes postgres.h.
>> By my opinion Datum should be defined in separate file and all headers
>> which use this type should include it. (this is problem on many places
>> with another types). Another question is why ecpg needs it?
>
> Datum is a type that no frontend code has any business dealing in;
> and the same goes for everything in primnodes.h.
>
> I'd suggest trying to fix ecpg to not depend on backend-only include
> files...
Yes, agree. I'm now testing my fix. I removed postgres.h from parser.c +
performed some other changes around.
Zdenek
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2007-10-25 15:22:54 | Re: Opportunity for a Radical Changes in Database Software |
Previous Message | Tom Lane | 2007-10-25 15:13:02 | Re: Datum should be defined outside postgres.h |