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 includes utils/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 -- c...@df7cb.de | http://www.df7cb.de/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers