Tom Lane wrote: > Perhaps a better idea would be to put the opaque-pointer typedefs into > heapam.h and genam.h respectively, and then see where you could remove > inclusions of relscan.h.
Hmm, this seems to be closely equivalent. Patch attached. I also moved SysScanDescData from genam.h to relscan.h. > Also, it seemed like some of those .c files had no business poking into > the scan structs anyway; particularly contrib. Did you check whether > the inclusions could be avoided? Not really, unless we were to provide something a routine that returns the current block of a scan. There are a few occurrences of this: /* must hold a buffer lock to call HeapTupleSatisfiesUpdate */ LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE); which of course need the definition. Maybe providing it is not a bad idea, because that kind of coding is used in the backend too. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Index: contrib/pgrowlocks/pgrowlocks.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/contrib/pgrowlocks/pgrowlocks.c,v retrieving revision 1.10 diff -c -p -r1.10 pgrowlocks.c *** contrib/pgrowlocks/pgrowlocks.c 12 May 2008 00:00:43 -0000 1.10 --- contrib/pgrowlocks/pgrowlocks.c 14 Jun 2008 23:16:20 -0000 *************** *** 26,31 **** --- 26,32 ---- #include "access/heapam.h" #include "access/multixact.h" + #include "access/relscan.h" #include "access/xact.h" #include "catalog/namespace.h" #include "funcapi.h" Index: contrib/pgstattuple/pgstattuple.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/contrib/pgstattuple/pgstattuple.c,v retrieving revision 1.35 diff -c -p -r1.35 pgstattuple.c *** contrib/pgstattuple/pgstattuple.c 16 May 2008 17:31:17 -0000 1.35 --- contrib/pgstattuple/pgstattuple.c 14 Jun 2008 23:20:41 -0000 *************** *** 29,34 **** --- 29,35 ---- #include "access/heapam.h" #include "access/htup.h" #include "access/nbtree.h" + #include "access/relscan.h" #include "catalog/namespace.h" #include "funcapi.h" #include "miscadmin.h" *************** pgstat_heap(Relation rel, FunctionCallIn *** 262,268 **** /* Disable syncscan because we assume we scan from block zero upwards */ scan = heap_beginscan_strat(rel, SnapshotAny, 0, NULL, true, false); ! nblocks = scan->rs_nblocks; /* # blocks to be scanned */ /* scan the relation */ while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) --- 263,269 ---- /* Disable syncscan because we assume we scan from block zero upwards */ scan = heap_beginscan_strat(rel, SnapshotAny, 0, NULL, true, false); ! nblocks = RelationGetNumberOfBlocks(rel); /* # blocks to be scanned */ /* scan the relation */ while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) Index: src/backend/access/gin/ginget.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/gin/ginget.c,v retrieving revision 1.16 diff -c -p -r1.16 ginget.c *** src/backend/access/gin/ginget.c 16 May 2008 16:31:01 -0000 1.16 --- src/backend/access/gin/ginget.c 14 Jun 2008 23:05:11 -0000 *************** *** 15,20 **** --- 15,21 ---- #include "postgres.h" #include "access/gin.h" + #include "access/relscan.h" #include "catalog/index.h" #include "miscadmin.h" #include "storage/bufmgr.h" Index: src/backend/access/gin/ginscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/gin/ginscan.c,v retrieving revision 1.14 diff -c -p -r1.14 ginscan.c *** src/backend/access/gin/ginscan.c 16 May 2008 16:31:01 -0000 1.14 --- src/backend/access/gin/ginscan.c 14 Jun 2008 23:05:01 -0000 *************** *** 14,21 **** #include "postgres.h" - #include "access/genam.h" #include "access/gin.h" #include "pgstat.h" #include "storage/bufmgr.h" #include "utils/memutils.h" --- 14,21 ---- #include "postgres.h" #include "access/gin.h" + #include "access/relscan.h" #include "pgstat.h" #include "storage/bufmgr.h" #include "utils/memutils.h" Index: src/backend/access/gist/gistget.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/gist/gistget.c,v retrieving revision 1.73 diff -c -p -r1.73 gistget.c *** src/backend/access/gist/gistget.c 12 May 2008 00:00:44 -0000 1.73 --- src/backend/access/gist/gistget.c 14 Jun 2008 22:53:35 -0000 *************** *** 15,20 **** --- 15,21 ---- #include "postgres.h" #include "access/gist_private.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "miscadmin.h" #include "pgstat.h" Index: src/backend/access/gist/gistscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/gist/gistscan.c,v retrieving revision 1.69 diff -c -p -r1.69 gistscan.c *** src/backend/access/gist/gistscan.c 12 May 2008 00:00:44 -0000 1.69 --- src/backend/access/gist/gistscan.c 14 Jun 2008 22:54:23 -0000 *************** *** 17,22 **** --- 17,23 ---- #include "access/genam.h" #include "access/gist_private.h" #include "access/gistscan.h" + #include "access/relscan.h" #include "storage/bufmgr.h" #include "utils/memutils.h" Index: src/backend/access/hash/hash.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/hash/hash.c,v retrieving revision 1.103 diff -c -p -r1.103 hash.c *** src/backend/access/hash/hash.c 12 May 2008 00:00:44 -0000 1.103 --- src/backend/access/hash/hash.c 14 Jun 2008 23:00:32 -0000 *************** *** 18,25 **** #include "postgres.h" - #include "access/genam.h" #include "access/hash.h" #include "catalog/index.h" #include "commands/vacuum.h" #include "miscadmin.h" --- 18,25 ---- #include "postgres.h" #include "access/hash.h" + #include "access/relscan.h" #include "catalog/index.h" #include "commands/vacuum.h" #include "miscadmin.h" Index: src/backend/access/hash/hashscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/hash/hashscan.c,v retrieving revision 1.44 diff -c -p -r1.44 hashscan.c *** src/backend/access/hash/hashscan.c 7 Mar 2008 15:59:03 -0000 1.44 --- src/backend/access/hash/hashscan.c 14 Jun 2008 23:04:22 -0000 *************** *** 16,21 **** --- 16,22 ---- #include "postgres.h" #include "access/hash.h" + #include "access/relscan.h" #include "utils/memutils.h" #include "utils/resowner.h" Index: src/backend/access/hash/hashsearch.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/hash/hashsearch.c,v retrieving revision 1.52 diff -c -p -r1.52 hashsearch.c *** src/backend/access/hash/hashsearch.c 12 May 2008 00:00:44 -0000 1.52 --- src/backend/access/hash/hashsearch.c 14 Jun 2008 23:04:34 -0000 *************** *** 15,20 **** --- 15,21 ---- #include "postgres.h" #include "access/hash.h" + #include "access/relscan.h" #include "pgstat.h" #include "storage/bufmgr.h" Index: src/backend/access/hash/hashutil.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/hash/hashutil.c,v retrieving revision 1.54 diff -c -p -r1.54 hashutil.c *** src/backend/access/hash/hashutil.c 12 May 2008 00:00:44 -0000 1.54 --- src/backend/access/hash/hashutil.c 14 Jun 2008 23:04:46 -0000 *************** *** 14,22 **** */ #include "postgres.h" - #include "access/genam.h" #include "access/hash.h" #include "access/reloptions.h" #include "executor/execdebug.h" #include "storage/bufmgr.h" #include "utils/lsyscache.h" --- 14,22 ---- */ #include "postgres.h" #include "access/hash.h" #include "access/reloptions.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "storage/bufmgr.h" #include "utils/lsyscache.h" Index: src/backend/access/heap/heapam.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/heap/heapam.c,v retrieving revision 1.259 diff -c -p -r1.259 heapam.c *** src/backend/access/heap/heapam.c 12 Jun 2008 09:12:30 -0000 1.259 --- src/backend/access/heap/heapam.c 14 Jun 2008 22:54:46 -0000 *************** *** 42,47 **** --- 42,48 ---- #include "access/heapam.h" #include "access/hio.h" #include "access/multixact.h" + #include "access/relscan.h" #include "access/sysattr.h" #include "access/transam.h" #include "access/tuptoaster.h" Index: src/backend/access/index/genam.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/index/genam.c,v retrieving revision 1.70 diff -c -p -r1.70 genam.c *** src/backend/access/index/genam.c 8 Jun 2008 23:16:43 -0000 1.70 --- src/backend/access/index/genam.c 14 Jun 2008 22:55:05 -0000 *************** *** 21,26 **** --- 21,27 ---- #include "access/genam.h" #include "access/heapam.h" + #include "access/relscan.h" #include "access/transam.h" #include "miscadmin.h" #include "pgstat.h" Index: src/backend/access/index/indexam.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/index/indexam.c,v retrieving revision 1.108 diff -c -p -r1.108 indexam.c *** src/backend/access/index/indexam.c 12 May 2008 00:00:45 -0000 1.108 --- src/backend/access/index/indexam.c 14 Jun 2008 22:55:22 -0000 *************** *** 64,69 **** --- 64,70 ---- #include "access/genam.h" #include "access/heapam.h" + #include "access/relscan.h" #include "access/transam.h" #include "pgstat.h" #include "storage/bufmgr.h" Index: src/backend/access/nbtree/nbtree.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/nbtree/nbtree.c,v retrieving revision 1.160 diff -c -p -r1.160 nbtree.c *** src/backend/access/nbtree/nbtree.c 12 May 2008 00:00:45 -0000 1.160 --- src/backend/access/nbtree/nbtree.c 14 Jun 2008 22:55:52 -0000 *************** *** 20,25 **** --- 20,26 ---- #include "access/genam.h" #include "access/nbtree.h" + #include "access/relscan.h" #include "catalog/index.h" #include "commands/vacuum.h" #include "miscadmin.h" Index: src/backend/access/nbtree/nbtsearch.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/nbtree/nbtsearch.c,v retrieving revision 1.117 diff -c -p -r1.117 nbtsearch.c *** src/backend/access/nbtree/nbtsearch.c 12 May 2008 00:00:45 -0000 1.117 --- src/backend/access/nbtree/nbtsearch.c 14 Jun 2008 22:56:03 -0000 *************** *** 17,22 **** --- 17,23 ---- #include "access/genam.h" #include "access/nbtree.h" + #include "access/relscan.h" #include "pgstat.h" #include "storage/bufmgr.h" #include "utils/lsyscache.h" Index: src/backend/access/nbtree/nbtutils.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/access/nbtree/nbtutils.c,v retrieving revision 1.90 diff -c -p -r1.90 nbtutils.c *** src/backend/access/nbtree/nbtutils.c 12 May 2008 00:00:45 -0000 1.90 --- src/backend/access/nbtree/nbtutils.c 14 Jun 2008 22:56:15 -0000 *************** *** 20,25 **** --- 20,26 ---- #include "access/genam.h" #include "access/nbtree.h" #include "access/reloptions.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "miscadmin.h" #include "storage/bufmgr.h" Index: src/backend/catalog/index.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/catalog/index.c,v retrieving revision 1.299 diff -c -p -r1.299 index.c *** src/backend/catalog/index.c 12 May 2008 20:01:59 -0000 1.299 --- src/backend/catalog/index.c 14 Jun 2008 22:56:46 -0000 *************** *** 25,30 **** --- 25,31 ---- #include "access/genam.h" #include "access/heapam.h" + #include "access/relscan.h" #include "access/sysattr.h" #include "access/transam.h" #include "access/xact.h" Index: src/backend/commands/cluster.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/commands/cluster.c,v retrieving revision 1.176 diff -c -p -r1.176 cluster.c *** src/backend/commands/cluster.c 12 May 2008 20:01:59 -0000 1.176 --- src/backend/commands/cluster.c 14 Jun 2008 22:57:27 -0000 *************** *** 19,24 **** --- 19,25 ---- #include "access/genam.h" #include "access/heapam.h" + #include "access/relscan.h" #include "access/rewriteheap.h" #include "access/transam.h" #include "access/xact.h" Index: src/backend/commands/tablecmds.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/commands/tablecmds.c,v retrieving revision 1.256 diff -c -p -r1.256 tablecmds.c *** src/backend/commands/tablecmds.c 14 Jun 2008 18:04:33 -0000 1.256 --- src/backend/commands/tablecmds.c 14 Jun 2008 22:57:55 -0000 *************** *** 17,22 **** --- 17,23 ---- #include "access/genam.h" #include "access/heapam.h" #include "access/reloptions.h" + #include "access/relscan.h" #include "access/sysattr.h" #include "access/xact.h" #include "catalog/catalog.h" Index: src/backend/executor/nodeBitmapHeapscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/executor/nodeBitmapHeapscan.c,v retrieving revision 1.28 diff -c -p -r1.28 nodeBitmapHeapscan.c *** src/backend/executor/nodeBitmapHeapscan.c 13 May 2008 15:44:08 -0000 1.28 --- src/backend/executor/nodeBitmapHeapscan.c 14 Jun 2008 22:58:36 -0000 *************** *** 36,41 **** --- 36,42 ---- #include "postgres.h" #include "access/heapam.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "executor/nodeBitmapHeapscan.h" #include "pgstat.h" Index: src/backend/executor/nodeIndexscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/executor/nodeIndexscan.c,v retrieving revision 1.128 diff -c -p -r1.128 nodeIndexscan.c *** src/backend/executor/nodeIndexscan.c 13 Apr 2008 20:51:20 -0000 1.128 --- src/backend/executor/nodeIndexscan.c 14 Jun 2008 22:58:50 -0000 *************** *** 26,31 **** --- 26,32 ---- #include "access/genam.h" #include "access/nbtree.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "executor/nodeIndexscan.h" #include "nodes/nodeFuncs.h" Index: src/backend/executor/nodeSeqscan.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/executor/nodeSeqscan.c,v retrieving revision 1.64 diff -c -p -r1.64 nodeSeqscan.c *** src/backend/executor/nodeSeqscan.c 1 Jan 2008 19:45:49 -0000 1.64 --- src/backend/executor/nodeSeqscan.c 14 Jun 2008 22:59:06 -0000 *************** *** 25,30 **** --- 25,31 ---- #include "postgres.h" #include "access/heapam.h" + #include "access/relscan.h" #include "executor/execdebug.h" #include "executor/nodeSeqscan.h" Index: src/backend/utils/cache/catcache.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/backend/utils/cache/catcache.c,v retrieving revision 1.143 diff -c -p -r1.143 catcache.c *** src/backend/utils/cache/catcache.c 12 May 2008 00:00:51 -0000 1.143 --- src/backend/utils/cache/catcache.c 14 Jun 2008 23:06:31 -0000 *************** *** 17,22 **** --- 17,23 ---- #include "access/genam.h" #include "access/hash.h" #include "access/heapam.h" + #include "access/relscan.h" #include "access/sysattr.h" #include "access/valid.h" #include "catalog/pg_operator.h" Index: src/include/access/genam.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/genam.h,v retrieving revision 1.73 diff -c -p -r1.73 genam.h *** src/include/access/genam.h 8 Jun 2008 22:41:04 -0000 1.73 --- src/include/access/genam.h 14 Jun 2008 22:46:54 -0000 *************** *** 14,25 **** #ifndef GENAM_H #define GENAM_H - #include "access/relscan.h" #include "access/sdir.h" #include "nodes/tidbitmap.h" #include "storage/buf.h" #include "storage/lock.h" #include "utils/rel.h" /* * Struct for statistics returned by ambuild --- 14,26 ---- #ifndef GENAM_H #define GENAM_H #include "access/sdir.h" + #include "access/skey.h" #include "nodes/tidbitmap.h" #include "storage/buf.h" #include "storage/lock.h" #include "utils/rel.h" + #include "utils/snapshot.h" /* * Struct for statistics returned by ambuild *************** typedef struct IndexBulkDeleteResult *** 73,93 **** /* Typedef for callback function to determine if a tuple is bulk-deletable */ typedef bool (*IndexBulkDeleteCallback) (ItemPointer itemptr, void *state); ! /* Struct for heap-or-index scans of system tables */ ! typedef struct SysScanDescData ! { ! Relation heap_rel; /* catalog being scanned */ ! Relation irel; /* NULL if doing heap scan */ ! HeapScanDesc scan; /* only valid in heap-scan case */ ! IndexScanDesc iscan; /* only valid in index-scan case */ ! } SysScanDescData; ! ! typedef SysScanDescData *SysScanDesc; /* * generalized index_ interface routines (in indexam.c) */ extern Relation index_open(Oid relationId, LOCKMODE lockmode); extern void index_close(Relation relation, LOCKMODE lockmode); --- 74,94 ---- /* Typedef for callback function to determine if a tuple is bulk-deletable */ typedef bool (*IndexBulkDeleteCallback) (ItemPointer itemptr, void *state); ! /* struct definitions appear in relscan.h */ ! typedef struct IndexScanDescData *IndexScanDesc; ! typedef struct SysScanDescData *SysScanDesc; /* * generalized index_ interface routines (in indexam.c) */ + + /* + * IndexScanIsValid + * True iff the index scan is valid. + */ + #define IndexScanIsValid(scan) PointerIsValid(scan) + extern Relation index_open(Oid relationId, LOCKMODE lockmode); extern void index_close(Relation relation, LOCKMODE lockmode); Index: src/include/access/gin.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/gin.h,v retrieving revision 1.21 diff -c -p -r1.21 gin.h *** src/include/access/gin.h 6 Jun 2008 22:35:22 -0000 1.21 --- src/include/access/gin.h 14 Jun 2008 23:00:09 -0000 *************** *** 12,19 **** #ifndef GIN_H #define GIN_H #include "access/itup.h" - #include "access/relscan.h" #include "access/xlog.h" #include "fmgr.h" #include "nodes/tidbitmap.h" --- 12,19 ---- #ifndef GIN_H #define GIN_H + #include "access/genam.h" #include "access/itup.h" #include "access/xlog.h" #include "fmgr.h" #include "nodes/tidbitmap.h" Index: src/include/access/hash.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/hash.h,v retrieving revision 1.87 diff -c -p -r1.87 hash.h *** src/include/access/hash.h 10 Apr 2008 22:25:25 -0000 1.87 --- src/include/access/hash.h 14 Jun 2008 23:01:57 -0000 *************** *** 17,28 **** #ifndef HASH_H #define HASH_H #include "access/itup.h" - #include "access/relscan.h" #include "access/sdir.h" #include "access/xlog.h" #include "fmgr.h" #include "storage/lock.h" /* * Mapping from hash bucket number to physical block number of bucket's --- 17,29 ---- #ifndef HASH_H #define HASH_H + #include "access/genam.h" #include "access/itup.h" #include "access/sdir.h" #include "access/xlog.h" #include "fmgr.h" #include "storage/lock.h" + #include "utils/rel.h" /* * Mapping from hash bucket number to physical block number of bucket's Index: src/include/access/heapam.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/heapam.h,v retrieving revision 1.136 diff -c -p -r1.136 heapam.h *** src/include/access/heapam.h 12 Jun 2008 09:12:31 -0000 1.136 --- src/include/access/heapam.h 14 Jun 2008 22:45:48 -0000 *************** *** 15,25 **** #define HEAPAM_H #include "access/htup.h" - #include "access/relscan.h" #include "access/sdir.h" #include "access/xlog.h" #include "nodes/primnodes.h" #include "storage/lock.h" #include "utils/snapshot.h" --- 15,27 ---- #define HEAPAM_H #include "access/htup.h" #include "access/sdir.h" + #include "access/skey.h" #include "access/xlog.h" #include "nodes/primnodes.h" + #include "storage/bufpage.h" #include "storage/lock.h" + #include "utils/rel.h" #include "utils/snapshot.h" *************** extern Relation heap_openrv(const RangeV *** 50,55 **** --- 52,66 ---- #define heap_close(r,l) relation_close(r,l) + /* struct definition appears in relscan.h */ + typedef struct HeapScanDescData *HeapScanDesc; + + /* + * HeapScanIsValid + * True iff the heap scan is valid. + */ + #define HeapScanIsValid(scan) PointerIsValid(scan) + extern HeapScanDesc heap_beginscan(Relation relation, Snapshot snapshot, int nkeys, ScanKey key); extern HeapScanDesc heap_beginscan_strat(Relation relation, Snapshot snapshot, Index: src/include/access/nbtree.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/nbtree.h,v retrieving revision 1.119 diff -c -p -r1.119 nbtree.h *** src/include/access/nbtree.h 6 Jun 2008 22:35:22 -0000 1.119 --- src/include/access/nbtree.h 14 Jun 2008 22:42:20 -0000 *************** *** 14,21 **** #ifndef NBTREE_H #define NBTREE_H #include "access/itup.h" - #include "access/relscan.h" #include "access/sdir.h" #include "access/xlog.h" #include "access/xlogutils.h" --- 14,21 ---- #ifndef NBTREE_H #define NBTREE_H + #include "access/genam.h" #include "access/itup.h" #include "access/sdir.h" #include "access/xlog.h" #include "access/xlogutils.h" Index: src/include/access/relscan.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/access/relscan.h,v retrieving revision 1.65 diff -c -p -r1.65 relscan.h *** src/include/access/relscan.h 12 May 2008 00:00:53 -0000 1.65 --- src/include/access/relscan.h 14 Jun 2008 22:47:59 -0000 *************** *** 14,19 **** --- 14,21 ---- #ifndef RELSCAN_H #define RELSCAN_H + #include "access/genam.h" + #include "access/heapam.h" #include "access/htup.h" #include "access/skey.h" #include "storage/bufpage.h" *************** typedef struct HeapScanDescData *** 54,61 **** OffsetNumber rs_vistuples[MaxHeapTuplesPerPage]; /* their offsets */ } HeapScanDescData; - typedef HeapScanDescData *HeapScanDesc; - /* * We use the same IndexScanDescData structure for both amgettuple-based * and amgetbitmap-based index scans. Some fields are only relevant in --- 56,61 ---- *************** typedef struct IndexScanDescData *** 89,107 **** TransactionId xs_prev_xmax; /* previous HOT chain member's XMAX, if any */ } IndexScanDescData; ! typedef IndexScanDescData *IndexScanDesc; ! ! ! /* ! * HeapScanIsValid ! * True iff the heap scan is valid. ! */ ! #define HeapScanIsValid(scan) PointerIsValid(scan) ! ! /* ! * IndexScanIsValid ! * True iff the index scan is valid. ! */ ! #define IndexScanIsValid(scan) PointerIsValid(scan) #endif /* RELSCAN_H */ --- 89,101 ---- TransactionId xs_prev_xmax; /* previous HOT chain member's XMAX, if any */ } IndexScanDescData; ! /* Struct for heap-or-index scans of system tables */ ! typedef struct SysScanDescData ! { ! Relation heap_rel; /* catalog being scanned */ ! Relation irel; /* NULL if doing heap scan */ ! HeapScanDesc scan; /* only valid in heap-scan case */ ! IndexScanDesc iscan; /* only valid in index-scan case */ ! } SysScanDescData; #endif /* RELSCAN_H */ Index: src/include/nodes/execnodes.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/nodes/execnodes.h,v retrieving revision 1.183 diff -c -p -r1.183 execnodes.h *** src/include/nodes/execnodes.h 1 Jan 2008 19:45:58 -0000 1.183 --- src/include/nodes/execnodes.h 14 Jun 2008 22:41:34 -0000 *************** *** 14,20 **** #ifndef EXECNODES_H #define EXECNODES_H ! #include "access/relscan.h" #include "nodes/params.h" #include "nodes/plannodes.h" #include "nodes/tidbitmap.h" --- 14,21 ---- #ifndef EXECNODES_H #define EXECNODES_H ! #include "access/genam.h" ! #include "access/heapam.h" #include "nodes/params.h" #include "nodes/plannodes.h" #include "nodes/tidbitmap.h" Index: src/include/nodes/print.h =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/include/nodes/print.h,v retrieving revision 1.28 diff -c -p -r1.28 print.h *** src/include/nodes/print.h 1 Jan 2008 19:45:58 -0000 1.28 --- src/include/nodes/print.h 14 Jun 2008 23:12:30 -0000 *************** *** 15,21 **** #define PRINT_H #include "nodes/parsenodes.h" ! #include "nodes/execnodes.h" #define nodeDisplay(x) pprint(x) --- 15,21 ---- #define PRINT_H #include "nodes/parsenodes.h" ! #include "executor/tuptable.h" #define nodeDisplay(x) pprint(x)
-- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches