Re: Datum should be defined outside postgres.h

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Datum should be defined outside postgres.h
Дата
Msg-id 200710251549.l9PFne402028@momjian.us
обсуждение исходный текст
Ответ на Re: Datum should be defined outside postgres.h  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Zdenek Kotala wrote:
> Zdenek Kotala wrote:
> > Tom Lane wrote:
> >> Zdenek Kotala <Zdenek.Kotala@Sun.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.

Another idea is to test the FRONTEND macro in the include file to
prevent inclusion of things you don't need.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: text search parser, "uri"
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Opportunity for a Radical Changes in Database Software