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-30 16:48:42 |
Message-ID: | 4727606A.1000600@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:
>> 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?
catalog directory contains mix of solutions :(. There are for example
functions defined into pg_type.h or there are namespace and
pg_namespace.h already.
My idea is to put functions declaration int pg_xxx.h and structure
declaration in pg_xxx_def.h. I'm not sure if split DATA into separate
header is good idea, but if yes then pg_xxx_data.h should be good name
for it (it seems that pg_dump needs only defines).
There is also problem with sequence.h which contains SEQ_MAX and
SEQ_MIN macros.
Comments?
Thanks Zdenek
> 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.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-10-30 17:00:12 | Re: install-strip causes dyld errors on OS X |
Previous Message | David Fetter | 2007-10-30 16:35:33 | Re: Proposal TODO Item: SQL-language reference parameters by name |