header files for spi.h/trigger.h

Started by Brook Milliganover 26 years ago5 messages
#1Brook Milligan
brook@trillium.NMSU.Edu

I am in the process of cleaning up the many un-needed includes and
adding includes so each *.h file can is compile-able on its own.

Speaking of header files, I'm pretty sure that not enough header files
get installed in order to compile something using spi.h/trigger.h
outside the postgresql source tree. This seems like a problem.

Shouldn't the normal install procedure install everything necessary to
use published postgresql header files?

Cheers,
Brook

#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Brook Milligan (#1)
Re: [HACKERS] header files for spi.h/trigger.h]

I am in the process of cleaning up the many un-needed includes and
adding includes so each *.h file can is compile-able on its own.

Speaking of header files, I'm pretty sure that not enough header files
get installed in order to compile something using spi.h/trigger.h
outside the postgresql source tree. This seems like a problem.

Shouldn't the normal install procedure install everything necessary to
use published postgresql header files?

Good questions. I am not touching spi.h because I realize they are used
by client code.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: [HACKERS] header files for spi.h/trigger.h]

Bruce Momjian <maillist@candle.pha.pa.us> writes:

Speaking of header files, I'm pretty sure that not enough header files
get installed in order to compile something using spi.h/trigger.h
outside the postgresql source tree. This seems like a problem.

Shouldn't the normal install procedure install everything necessary to
use published postgresql header files?

Good questions. I am not touching spi.h because I realize they are used
by client code.

But how much of the stuff that those files are including is really
needed to compile them? It could be that the right answer is not to
install more headers but to get rid of some #includes in the headers
that are published...

regards, tom lane

#4Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Tom Lane (#3)
Re: [HACKERS] header files for spi.h/trigger.h]

Bruce Momjian <maillist@candle.pha.pa.us> writes:

Speaking of header files, I'm pretty sure that not enough header files
get installed in order to compile something using spi.h/trigger.h
outside the postgresql source tree. This seems like a problem.

Shouldn't the normal install procedure install everything necessary to
use published postgresql header files?

Good questions. I am not touching spi.h because I realize they are used
by client code.

But how much of the stuff that those files are including is really
needed to compile them? It could be that the right answer is not to
install more headers but to get rid of some #includes in the headers
that are published...

I am doing that will all the other include files, but because spi.h is
used in contrib, I assume they want some stuff auto-included with spi.h.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#5Adriaan Joubert
a.joubert@albourne.com
In reply to: Bruce Momjian (#4)
Re: [HACKERS] header files for spi.h/trigger.h]

I am doing that will all the other include files, but because spi.h is
used in contrib, I assume they want some stuff auto-included with spi.h.

I sent in a bug-report a while back for all the files that I needed to
include to compile something using spi.h. Lost that message, but here is
the listing of my
current installed include tree.

This was a pretty minimal copy of files accross, just to get something
using spi.h to compile, i.e. trigger.h may need more. I think I copied
the storage directory accross as a whole, but for the rest only the
files that are really required are included. I think you can safely
assume that everything date Jun 19th needs to be added.

Adriaan

bash-2.03$ ls -lR include
total 110
drwxr-xr-x 2 postgres postgres 512 Jun 29 10:10 access
-r--r--r-- 1 postgres postgres 19636 Jun 15 18:14 c.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 10:11 catalog
drwxr-xr-x 2 postgres postgres 512 Jun 15 18:14 commands
-r--r--r-- 1 postgres postgres 15937 Jun 15 18:14 config.h
-r--r--r-- 1 postgres postgres 929 Jun 15 18:14 ecpgerrno.h
-r--r--r-- 1 postgres postgres 1206 Jun 15 18:14 ecpglib.h
-r--r--r-- 1 postgres postgres 1549 Jun 15 18:14 ecpgtype.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 10:07 executor
-r--r--r-- 1 postgres postgres 24960 Jun 15 18:14 fmgr.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 09:40 lib
-r--r--r-- 1 postgres postgres 588 Jun 17 11:19 libpgtcl.h
drwxr-xr-x 2 postgres postgres 512 Jun 15 18:14 libpq
-r--r--r-- 1 postgres postgres 10277 Jun 15 18:14 libpq-fe.h
-r--r--r-- 1 postgres postgres 10190 Jun 15 18:14 libpq-int.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 09:46 nodes
-r--r--r-- 1 postgres postgres 169 Jun 15 18:14 os.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 10:02 parser
drwxr-xr-x 3 postgres postgres 512 Jun 15 18:14 port
-r--r--r-- 1 postgres postgres 5098 Jun 15 18:14 postgres.h
-r--r--r-- 1 postgres postgres 1222 Jun 15 18:14 postgres_ext.h
drwxr-xr-x 2 postgres postgres 512 Jun 29 09:45 rewrite
-r--r--r-- 1 postgres postgres 957 Jun 15 18:14 sqlca.h
drwxr-xr-x 2 postgres postgres 1024 Jun 29 10:15 storage
drwxrwxr-x 2 postgres postgres 512 Jun 29 10:02 tcop
drwxr-xr-x 2 postgres postgres 512 Jun 29 10:16 utils

include/access:
total 46
-r--r--r-- 1 postgres postgres 1465 Jun 15 18:14 attnum.h
-rw-r--r-- 1 postgres postgres 1158 Jun 29 09:46 funcindex.h
-rw-r--r-- 1 postgres postgres 8080 Jun 29 10:04 heapam.h
-rw-r--r-- 1 postgres postgres 4002 Jun 29 09:40 htup.h
-rw-r--r-- 1 postgres postgres 863 Jun 29 10:10 ibit.h
-rw-r--r-- 1 postgres postgres 4080 Jun 29 10:09 itup.h
-rw-r--r-- 1 postgres postgres 2652 Jun 29 09:42 relscan.h
-rw-r--r-- 1 postgres postgres 1399 Jun 29 09:45 sdir.h
-rw-r--r-- 1 postgres postgres 1210 Jun 29 09:43 skey.h
-rw-r--r-- 1 postgres postgres 2506 Jun 29 09:43 strat.h
-rw-r--r-- 1 postgres postgres 5683 Jun 29 10:04 transam.h
-rw-r--r-- 1 postgres postgres 1804 Jun 29 09:44 tupdesc.h
-rw-r--r-- 1 postgres postgres 2868 Jun 29 10:04 tupmacs.h
-rw-r--r-- 1 postgres postgres 3413 Jun 29 10:04 xact.h

include/catalog:
total 205
-rw-r--r-- 1 postgres postgres 1713 Jun 29 10:11 catname.h
-rw-r--r-- 1 postgres postgres 3351 Jun 29 09:43 pg_am.h
-rw-r--r-- 1 postgres postgres 23347 Jun 29 09:44 pg_attribute.h
-rw-r--r-- 1 postgres postgres 6048 Jun 29 09:43 pg_class.h
-rw-r--r-- 1 postgres postgres 2780 Jun 29 10:07 pg_index.h
-rw-r--r-- 1 postgres postgres 2132 Jun 29 10:04 pg_language.h
-rw-r--r-- 1 postgres postgres 131098 Jun 29 09:46 pg_proc.h
-rw-r--r-- 1 postgres postgres 19494 Jun 29 09:47 pg_type.h

include/commands:
total 3
-r--r--r-- 1 postgres postgres 2243 Jun 15 18:14 trigger.h

include/executor:
total 20
-rw-r--r-- 1 postgres postgres 1177 Jun 29 10:07 execdefs.h
-rw-r--r-- 1 postgres postgres 1024 Jun 29 09:48 execdesc.h
-rw-r--r-- 1 postgres postgres 6313 Jun 29 10:06 executor.h
-rw-r--r-- 1 postgres postgres 3836 Jun 29 09:40 hashjoin.h
-r--r--r-- 1 postgres postgres 2913 Jun 15 18:14 spi.h
-rw-r--r-- 1 postgres postgres 2244 Jun 29 09:46 tuptable.h

include/lib:
total 6
-r--r--r-- 1 postgres postgres 2277 Jun 15 18:14 dllist.h
-rw-r--r-- 1 postgres postgres 2887 Jun 29 09:40 fstack.h

include/libpq:
total 9
-r--r--r-- 1 postgres postgres 3313 Jun 15 18:14 libpq-fs.h
-r--r--r-- 1 postgres postgres 4623 Jun 15 18:14 pqcomm.h

include/nodes:
total 90
-rw-r--r-- 1 postgres postgres 23654 Jun 29 09:39 execnodes.h
-rw-r--r-- 1 postgres postgres 2768 Jun 29 09:39 memnodes.h
-rw-r--r-- 1 postgres postgres 6090 Jun 29 09:38 nodes.h
-rw-r--r-- 1 postgres postgres 2983 Jun 29 09:45 params.h
-rw-r--r-- 1 postgres postgres 24571 Jun 29 09:39 parsenodes.h
-rw-r--r-- 1 postgres postgres 2838 Jun 29 09:38 pg_list.h
-rw-r--r-- 1 postgres postgres 8459 Jun 29 09:46 plannodes.h
-rw-r--r-- 1 postgres postgres 10348 Jun 29 09:00 primnodes.h
-rw-r--r-- 1 postgres postgres 6981 Jun 29 09:39 relation.h

include/parser:
total 3
-rw-r--r-- 1 postgres postgres 1386 Jun 29 10:02 parse_node.h
-rw-r--r-- 1 postgres postgres 996 Jun 29 10:02 parse_type.h

include/port:
total 1
drwxr-xr-x 2 postgres postgres 512 Jun 15 18:14 alpha

include/port/alpha:
total 0

include/rewrite:
total 1
-rw-r--r-- 1 postgres postgres 996 Jun 29 09:45 prs2lock.h

include/storage:
total 90
-rw-r--r-- 1 postgres postgres 830 Jun 29 10:15 backendid.h
-rw-r--r-- 1 postgres postgres 3164 Jun 29 10:15 block.h
-rw-r--r-- 1 postgres postgres 1110 Jun 29 10:15 buf.h
-rw-r--r-- 1 postgres postgres 4979 Jun 29 10:15 buf_internals.h
-rw-r--r-- 1 postgres postgres 4513 Jun 29 10:15 bufmgr.h
-rw-r--r-- 1 postgres postgres 8684 Jun 29 10:15 bufpage.h
-rw-r--r-- 1 postgres postgres 3251 Jun 29 10:15 fd.h
-rw-r--r-- 1 postgres postgres 5352 Jun 29 10:15 ipc.h
-rw-r--r-- 1 postgres postgres 411 Jun 29 10:15 item.h
-rw-r--r-- 1 postgres postgres 1546 Jun 29 10:15 itemid.h
-rw-r--r-- 1 postgres postgres 962 Jun 29 10:15 itempos.h
-rw-r--r-- 1 postgres postgres 2921 Jun 29 10:15 itemptr.h
-rw-r--r-- 1 postgres postgres 1977 Jun 29 10:15 large_object.h
-rw-r--r-- 1 postgres postgres 1729 Jun 29 10:15 lmgr.h
-rw-r--r-- 1 postgres postgres 7599 Jun 29 10:15 lock.h
-rw-r--r-- 1 postgres postgres 1844 Jun 29 10:15 multilev.h
-rw-r--r-- 1 postgres postgres 1533 Jun 29 10:15 off.h
-rw-r--r-- 1 postgres postgres 523 Jun 29 10:15 page.h
-rw-r--r-- 1 postgres postgres 689 Jun 29 10:15 pagenum.h
-rw-r--r-- 1 postgres postgres 1533 Jun 29 10:15 pos.h
-rw-r--r-- 1 postgres postgres 3554 Jun 29 10:15 proc.h
-rw-r--r-- 1 postgres postgres 9219 Jun 29 10:15 s_lock.h
-rw-r--r-- 1 postgres postgres 3197 Jun 29 10:15 shmem.h
-rw-r--r-- 1 postgres postgres 880 Jun 29 10:15 sinval.h
-rw-r--r-- 1 postgres postgres 3947 Jun 29 10:15 sinvaladt.h
-rw-r--r-- 1 postgres postgres 3008 Jun 29 10:15 smgr.h
-rw-r--r-- 1 postgres postgres 828 Jun 29 10:15 spin.h

include/tcop:
total 9
-rw-r--r-- 1 postgres postgres 4143 Jun 29 09:47 dest.h
-rw-r--r-- 1 postgres postgres 814 Jun 29 09:48 pquery.h
-rw-r--r-- 1 postgres postgres 2032 Jun 29 10:01 tcopprot.h
-rw-r--r-- 1 postgres postgres 493 Jun 29 10:02 utility.h

include/utils:
total 109
-rw-r--r-- 1 postgres postgres 5443 Jun 29 10:03 array.h
-rw-r--r-- 1 postgres postgres 25268 Jun 29 10:03 builtins.h
-rw-r--r-- 1 postgres postgres 1406 Jun 29 10:03 cash.h
-rw-r--r-- 1 postgres postgres 477 Jun 29 10:03 datetime.h
-rw-r--r-- 1 postgres postgres 2035 Jun 29 10:02 datum.h
-rw-r--r-- 1 postgres postgres 11237 Jun 29 09:40 dt.h
-r--r--r-- 1 postgres postgres 1600 Jun 15 18:14 elog.h
-rw-r--r-- 1 postgres postgres 1689 Jun 29 09:37 fcache.h
-r--r--r-- 1 postgres postgres 13260 Jun 15 18:14 geo_decls.h
-rw-r--r-- 1 postgres postgres 4659 Jun 29 10:16 hsearch.h
-rw-r--r-- 1 postgres postgres 1070 Jun 29 10:03 inet.h
-rw-r--r-- 1 postgres postgres 3190 Jun 29 10:03 int8.h
-r--r--r-- 1 postgres postgres 1706 Jun 15 18:14 mcxt.h
-rw-r--r-- 1 postgres postgres 8584 Jun 29 09:40 memutils.h
-rw-r--r-- 1 postgres postgres 4126 Jun 29 09:40 nabstime.h
-rw-r--r-- 1 postgres postgres 1736 Jun 29 10:03 numeric.h
-r--r--r-- 1 postgres postgres 1066 Jun 15 18:14 palloc.h
-rw-r--r-- 1 postgres postgres 2571 Jun 29 10:03 portal.h
-rw-r--r-- 1 postgres postgres 4345 Jun 29 09:42 rel.h
-rw-r--r-- 1 postgres postgres 2530 Jun 29 10:02 syscache.h
-rw-r--r-- 1 postgres postgres 2961 Jun 29 09:45 tqual.h