Re: [HACKERS] interface libpq Makefile.in patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] interface libpq Makefile.in patch
Date: 1999-02-11 23:42:22
Message-ID: 22143.918776542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> The following patch is needed to compile the current development tree
>> with perl support. The addition of MemoryContextAlloc,
>> MemoryContextFree, and MemoryContexRealloc in
>> ./src/include/utils/palloc.h require these additional header files.

> Something wrong here ... palloc should not be visible outside the
> backend.

I have fixed the immediate symptom of the problem by making the Perl5
module not require libpq-int.h, which is better programming practice
anyway.

However, it is true that including libpq-int.h now requires access
to backend include files that are not currently being installed into
/usr/local/pgsql/include. Thus, compiling an outside application
that uses libpq-int.h will presently fail.

I had intended all along to someday stop exporting libpq-int.h, but I
didn't really want to break code dependent on it this soon :-(.
In any case, I think that the very same problem will occur for backend
extension code (SPI) compiled outside the Postgres source tree --- the
real problem is that "postgres.h" can't be included from the install
tree anymore.

I think we have two reasonable alternatives:

(1) Install a bunch more backend-internals header files, along the lines
of Ryan's proposed patch. Evidently we need
include/utils/mcxt.h
include/nodes/memnodes.h
include/nodes/nodes.h
include/lib/fstack.h
include/utils/memutils.h
and possibly other stuff.

(2) Try to clean up the palloc macros so that they don't need quite as
many random include files to be available. (Jan? Any chance of
reducing the tonnage a little?)

BTW, it'd really be a good idea to stop using libpq's makefile as the
place where backend header files are installed...

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-02-12 02:06:12 Re: [HACKERS] VACUUM ANALYZE problem on linux
Previous Message Bruce Momjian 1999-02-11 23:35:57 Re: [HACKERS] Temp tables