Re: Datum should be defined outside postgres.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Datum should be defined outside postgres.h
Date
Msg-id 16713.1193327167@sss.pgh.pa.us
Whole thread Raw
In response to Re: Datum should be defined outside postgres.h  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: Datum should be defined outside postgres.h
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> One solution should be put sugar words into separate header and include 
> them directly from catalog/*.h files.

Yeah, that would probably be a good idea.  It's unlikely that we'll
get away anytime soon from frontend code wanting to include
catalog/pg_type.h, in particular (to get the macros for type OIDs).

[ looks at code... ]  Another problem with #including those headers
without postgres.h is going to be the function declarations --- eg.
GenerateTypeDependencies() needs Node *.  I've always thought that
the function declarations lurking at the bottom of the catalog
headers were pretty out-of-place anyway.  What say we pull all
the function declarations out of the catalog/pg_xxx.h files?

Not quite sure where to put them instead, though.  We could smash
them all into one new header, but if you want to keep a separate
header per module then we'll need some new naming convention to
select the filenames to use.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: Datum should be defined outside postgres.h
Next
From: Tom Lane
Date:
Subject: Re: text search parser, "uri"