Re: Datum should be defined outside postgres.h

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:35:23
Message-ID: 4720B7BB.7020905@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala wrote:
> Tom Lane wrote:
>> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:

>>> 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...

OK the problem now is pg_dump.c. It includes postgres.h :( and it is
described there why. It needs it for catalog header files.

Any suggestion how to fix it?

One solution should be put sugar words into separate header and include
them directly from catalog/*.h files.

Zdenek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2007-10-25 15:38:46 Re: Datum should be defined outside postgres.h
Previous Message Tom Lane 2007-10-25 15:31:15 Re: Datum should be defined outside postgres.h