Re: [HACKERS] SPI Headers -- RPM distribution
От | Lamar Owen |
---|---|
Тема | Re: [HACKERS] SPI Headers -- RPM distribution |
Дата | |
Msg-id | 385EA3CA.CD7B1437@wgcr.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] SPI Headers -- RPM distribution (wieck@debis.com (Jan Wieck)) |
Список | pgsql-hackers |
Jan Wieck wrote: > > Ok, thanks to Oliver and others, I think I may have a handle on which > > header files to include in the postgresql-devel RPM for the ability to > > compile backend modules. > I'm not totally sure, but IIRC the dependency list was the > one of spi.c, no? > If so, it's IMHO wrong. A user written module doesn't need > anything, spi.c needs (especially the parts included by > spi_priv.h). SPI hides many internals by making the prepared > plan an opaque object (void *). As is probably obvious from my posting, I have never built an SPI module -- however, I do want to make the RPM's SPI-friendly. Oliver posted the list of includes that he ships in the Debian packages -- I am digesting that list now, comparing with a list of the files in the distribution tarball. While including the entire source tree is a last resort, it should be possible to allow SPI programming without the whole 28MB unbuilt source tree. According to the documentation, all an SPI module needs is to #include executor/spi.h. Well, spi.h needs (all includes after full expansion via /usr/lib/cpp -I../../include -I../../backend -M spi.h, stripping the system header files, stripping the ../../, reformatting to one header per line, and sorting): (paths relative to PG-SOURCE-TREE/src/) backend/fmgr.h include/access/attnum.h include/access/funcindex.h include/access/heapam.h include/access/htup.h include/access/ibit.h include/access/itup.h include/access/relscan.h include/access/sdir.h include/access/skey.h include/access/strat.h include/access/transam.h include/access/tupdesc.h include/access/tupmacs.h include/access/xact.h include/c.h include/catalog/catname.h include/catalog/pg_am.h include/catalog/pg_attribute.h include/catalog/pg_class.h include/catalog/pg_index.h include/catalog/pg_language.h include/catalog/pg_proc.h include/catalog/pg_type.h include/config.h include/executor/execdefs.h include/executor/execdesc.h include/executor/executor.h include/executor/hashjoin.h include/executor/tuptable.h include/lib/fstack.h include/nodes/execnodes.h include/nodes/memnodes.h include/nodes/nodes.h include/nodes/params.h include/nodes/parsenodes.h include/nodes/pg_list.h include/nodes/plannodes.h include/nodes/primnodes.h include/nodes/relation.h include/os.h include/parser/parse_node.h include/parser/parse_type.h include/postgres.h include/postgres_ext.h include/rewrite/prs2lock.h include/storage/block.h include/storage/buf.h include/storage/buf_internals.h include/storage/bufmgr.h include/storage/bufpage.h include/storage/fd.h include/storage/ipc.h include/storage/item.h include/storage/itemid.h include/storage/itemptr.h include/storage/lmgr.h include/storage/lock.h include/storage/off.h include/storage/page.h include/storage/shmem.h include/storage/sinvaladt.h include/storage/spin.h include/tcop/dest.h include/tcop/pquery.h include/tcop/tcopprot.h include/tcop/utility.h include/utils/array.h include/utils/builtins.h include/utils/datetime.h include/utils/datum.h include/utils/dt.h include/utils/elog.h include/utils/fcache.h include/utils/geo_decls.h include/utils/hsearch.h include/utils/inet.h include/utils/int8.h include/utils/mcxt.h include/utils/memutils.h include/utils/nabstime.h include/utils/numeric.h include/utils/palloc.h include/utils/portal.h include/utils/rel.h include/utils/syscache.h include/utils/tqual.h (87 header files) Well, analyzing spi.c the same way, it needs only 90 headers -- diff tells me that the ONLY additional headers needed by spi.c that are not needed by spi.h are spi.h (duh), spi_priv.h, and printtup.h. To reiterate my thought -- a full source tree should not be necessary to do meaningful work on PostgreSQL -- that's the whole reason for existence of the binary distributions. I am going to incorporate the above listed headers in the postgresql-devel RPM -- I am not at all sure where I need to put them, however. The PostgreSQL include directory under the RPM installation is /usr/include/pgsql (not my choice, but would be hard to retroactively change) -- maybe put these files under that in either backend, or SPI?? -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
В списке pgsql-hackers по дате отправления:
Предыдущее
От: wieck@debis.com (Jan Wieck)Дата:
Сообщение: Re: [HACKERS] SPI Headers -- RPM distribution
Следующее
От: wieck@debis.com (Jan Wieck)Дата:
Сообщение: Tuple toaster (was: Re: LONG varsize - how to go on)