From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Limit usage of tcop/dest.h |
Date: | 2005-11-02 13:50:07 |
Message-ID: | 20051102135007.GC26524@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Hi,
I just found out that tcop/dest.h is included in executor/spi.h, and it
contains many things that aren't needed for compiling SPI programs/
libraries. By way of example I compiled the whole of contrib with the
attached patch and it works fine. Notice that the only thing I'm doing
is taking the forward declaration of Portal into a separate file,
portalforw.h -- that's the only definition that's really needed by SPI
programs. (It also allows PL/php to compile without having to patch PHP
nor PostgreSQL sources).
Note that since tcop/dest.h now includes portalforw.h, anybody who
currently needs the Portal definition is still getting it. The only
thing I'm doing is un-export the rest of tcop/dest.h from
executor/spi.h.
So instead of changing the names of the CommandDest enum, I'm hiding it
from external view.
Note that executor/spi.h does not follow the convention that #includes
should be alphabetically ordered. I did not change that in this patch
in order to show that this change is really minimal.
Does anybody object to committing this patch to current CVS HEAD?
(Comments about a better position/name for the new file are welcome.)
--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"The only difference is that Saddam would kill you on private, where the
Americans will kill you in public" (Mohammad Saleh, 39, a building contractor)
Attachment | Content-Type | Size |
---|---|---|
portalforw.h | text/x-chdr | 354 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-11-02 14:11:04 | Re: Limit usage of tcop/dest.h |
Previous Message | Andrew Dunstan | 2005-11-02 13:25:46 | Re: pg_restore [archiver] file offset in dump file is too |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-11-02 13:55:50 | Re: tsearch2 makefile fixes |
Previous Message | Teodor Sigaev | 2005-11-02 13:41:32 | Re: tsearch2 makefile fixes |