includedir_internal headers are not self-contained

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема includedir_internal headers are not self-contained
Дата
Msg-id 20140426122548.GA7249@msgid.df7cb.de
обсуждение исходный текст
Ответы Re: includedir_internal headers are not self-contained  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Debian is shipping client headers in /usr/include/postgresql in the
libpq-dev package. The server headers go into
/usr/include/postgresql/<major>/server in postgresql-server-dev-<major>,
so we can have the headers for several majors installed in parallel.

Historically, a few server headers were also included in libpq-dev
because 9 years ago, there were some client apps that needed them.
We've finally got around to fix that [1], now the layout is:

libpq-dev: /usr/include/postgresql/internal/* /usr/include/postgresql/libpq-fe.h /usr/include/postgresql/libpq-events.h
/usr/include/postgresql/libpq/libpq-fs.h/usr/include/postgresql/pg_config*.h /usr/include/postgresql/postgres_ext.h
 

postgresql-server-dev-<major>: /usr/include/postgresql/<major>/server/*

Unfortunately the files in internal/ are not self-contained: internal/postgres_fe.h includes common/fe_memutils.h which
includesutils/palloc.h
 

Both common/ and utils/ are server-only, so you can't build client
apps which need postgres_fe.h with only libpq-dev installed.

common/ was introduced in 8396447cdbdff0b62914748de2fec04281dc9114,
and added to src/include/Makefile in c153530dc10bf5ff6dc5a89249f9cb596dd71a63.

I believe common/ should be also be installed by includedir_internal.
utils/ should probably also be installed there, alternatively only the
headers referred to from common/, the files directly referred being:

$ grep -r include 9.4/server/common/ | grep \"
9.4/server/common/fe_memutils.h:#include "utils/palloc.h"
9.4/server/common/relpath.h:#include "catalog/catversion.h" /* pgrminclude ignore */
9.4/server/common/relpath.h:#include "storage/relfilenode.h"

I'd write a patch for src/include/Makefile, but we'd need to sort out
the layout first.

On a sidenote, I don't see why utils/errcodes.h and utils/fmgroids.h
need a separate INSTALL_DATA call when they are installed by into
utils/ anyway.

(Another issue is that client apps frequently seem to want
catalog/pg_type.h to get the OID definitions, it might make sense to
move that also to internal/.)

Christoph

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314427
-- 
cb@df7cb.de | http://www.df7cb.de/



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Hashable custom types
Следующее
От: David Fetter
Дата:
Сообщение: Re: Decrease MAX_BACKENDS to 2^16