]> granicus.if.org Git - postgresql/commitdiff
Split tuple struct defs from htup.h to htup_details.h
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 30 Aug 2012 20:15:44 +0000 (16:15 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 30 Aug 2012 20:52:35 +0000 (16:52 -0400)
This reduces unnecessary exposure of other headers through htup.h, which
is very widely included by many files.

I have chosen to move the function prototypes to the new file as well,
because that means htup.h no longer needs to include tupdesc.h.  In
itself this doesn't have much effect in indirect inclusion of tupdesc.h
throughout the tree, because it's also required by execnodes.h; but it's
something to explore in the future, and it seemed best to do the htup.h
change now while I'm busy with it.

167 files changed:
contrib/dblink/dblink.c
contrib/file_fdw/file_fdw.c
contrib/hstore/hstore_io.c
contrib/hstore/hstore_op.c
contrib/ltree/ltree_op.c
contrib/pageinspect/heapfuncs.c
contrib/pageinspect/rawpage.c
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/tablefunc/tablefunc.c
contrib/tcn/tcn.c
contrib/xml2/xpath.c
src/backend/access/common/reloptions.c
src/backend/access/common/tupconvert.c
src/backend/access/common/tupdesc.c
src/backend/access/heap/hio.c
src/backend/access/heap/pruneheap.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlogfuncs.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/indexing.c
src/backend/catalog/namespace.c
src/backend/catalog/objectaddress.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_collation.c
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_conversion.c
src/backend/catalog/pg_db_role_setting.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_inherits.c
src/backend/catalog/pg_largeobject.c
src/backend/catalog/pg_namespace.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_range.c
src/backend/catalog/pg_shdepend.c
src/backend/catalog/pg_type.c
src/backend/commands/aggregatecmds.c
src/backend/commands/alter.c
src/backend/commands/collationcmds.c
src/backend/commands/comment.c
src/backend/commands/conversioncmds.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/dbcommands.c
src/backend/commands/dropcmds.c
src/backend/commands/event_trigger.c
src/backend/commands/extension.c
src/backend/commands/foreigncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/indexcmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/proclang.c
src/backend/commands/schemacmds.c
src/backend/commands/seclabel.c
src/backend/commands/sequence.c
src/backend/commands/tablespace.c
src/backend/commands/trigger.c
src/backend/commands/tsearchcmds.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/backend/commands/variable.c
src/backend/executor/execAmi.c
src/backend/executor/execMain.c
src/backend/executor/execQual.c
src/backend/executor/execTuples.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeLockRows.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeWindowAgg.c
src/backend/executor/spi.c
src/backend/foreign/foreign.c
src/backend/nodes/tidbitmap.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/plancat.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_type.c
src/backend/parser/parse_utilcmd.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteRemove.c
src/backend/rewrite/rewriteSupport.c
src/backend/storage/freespace/freespace.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/page/bufpage.c
src/backend/tcop/fastpath.c
src/backend/tcop/utility.c
src/backend/tsearch/ts_selfuncs.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/array_selfuncs.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/enum.c
src/backend/utils/adt/format_type.c
src/backend/utils/adt/genfile.c
src/backend/utils/adt/json.c
src/backend/utils/adt/lockfuncs.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/rangetypes_selfuncs.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/rowtypes.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/trigfuncs.c
src/backend/utils/adt/varbit.c
src/backend/utils/adt/xml.c
src/backend/utils/cache/evtcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/syscache.c
src/backend/utils/cache/ts_cache.c
src/backend/utils/cache/typcache.c
src/backend/utils/fmgr/funcapi.c
src/backend/utils/init/miscinit.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/superuser.c
src/backend/utils/sort/tuplesort.c
src/backend/utils/sort/tuplestore.c
src/backend/utils/time/combocid.c
src/backend/utils/time/tqual.c
src/include/access/heapam.h
src/include/access/heapam_xlog.h
src/include/access/htup.h
src/include/access/htup_details.h [new file with mode: 0644]
src/include/access/reloptions.h
src/include/access/relscan.h
src/include/access/tupconvert.h
src/include/access/tuptoaster.h
src/include/executor/tuptable.h
src/include/utils/inval.h
src/include/utils/lsyscache.h
src/pl/plperl/plperl.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_handler.c
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_main.c
src/pl/plpython/plpy_procedure.c
src/pl/plpython/plpy_spi.c
src/pl/plpython/plpy_typeio.c
src/pl/plpython/plpy_typeio.h
src/pl/tcl/pltcl.c

index 9dd0fc547bdcbcb55071083474a734e1d55b9c35..9f1dac899e14b62dc81cd2349163f651c68d0367 100644 (file)
 #include <limits.h>
 
 #include "libpq-fe.h"
-#include "funcapi.h"
+
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "executor/spi.h"
 #include "foreign/foreign.h"
+#include "funcapi.h"
 #include "lib/stringinfo.h"
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
index 7c7fedfcdbbcebd608a860754533d72c5c13bd76..81fc4e29008b201d37a688e0e769c7e9df59ae6d 100644 (file)
@@ -15,6 +15,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "access/sysattr.h"
 #include "catalog/pg_foreign_table.h"
index 7bdac3d94cbde788b7e11b479b8be6dac7c1725b..e84cdd69051c9205683e16b90234f379998a23c0 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
index fee2c3c5aea7415648c027b9dbd86c9d8d67715f..45edb048ceb7e6bf361dd67830db1c04dbd59ab9 100644 (file)
@@ -4,6 +4,7 @@
 #include "postgres.h"
 
 #include "access/hash.h"
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "utils/builtins.h"
index 4d8fb842c14fedcfab04e5db5db6693b2a217ee0..25b6db1b1aab33883e64a64a995fa1e4da7b5d80 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_statistic.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
index 260ccffdc7c514bdcf2d5748efe2697c93a456b9..6f3af776740eaa63f872a841671f8ef27e699822 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "funcapi.h"
 #include "utils/builtins.h"
 #include "miscadmin.h"
index e8a79401adc3a7cc35e84b67777418508ee395d3..52eb55267b858a8fefb65f8ac47c8a202a68d112 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/catalog.h"
 #include "catalog/namespace.h"
 #include "funcapi.h"
index 27e52b3b35f333034d3213970e11a88392856e3c..dbf8030f7c6f0924200cde1a16c881e75665716e 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "storage/buf_internals.h"
index 963a88fa104100cdabcad67f78a4b23be0ff42c0..8be7ad46196608519a0d5a461247737e3e1ea0c1 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <math.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "executor/spi.h"
 #include "funcapi.h"
index 314632dd893631950991ba6b51f3ad9ae8cc9cda..6a8a96f60339118f7edb11668c5db23fbf85c211 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "executor/spi.h"
 #include "commands/async.h"
 #include "commands/trigger.h"
index 660d25c3490bc6bfda8298e3d474186fe7e14492..41cb98d13952b6d138e640baa476373425dac012 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "executor/spi.h"
 #include "fmgr.h"
 #include "funcapi.h"
index 1eeaadecffe5c30ad40a0c09ce57f78415397b6b..bc6911e4960043211ea6f0c5f2172a04fbcdd668 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "access/gist_private.h"
 #include "access/hash.h"
+#include "access/htup_details.h"
 #include "access/nbtree.h"
 #include "access/reloptions.h"
 #include "access/spgist.h"
index f5a43d47b88d4e2aa63dca6199160554dd1790c2..f813432c7d587815438fd5aa84cb9828c0cfad3f 100644 (file)
@@ -20,6 +20,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/tupconvert.h"
 #include "utils/builtins.h"
 
index 99d0d1802ce7451befddc7d58c7e8e97a03ad7bc..2f10910b823fba94b3f335715071110cfa43bbe1 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "miscadmin.h"
 #include "parser/parse_type.h"
index 19a34923c7a74ddbf09d073ffe09f7cb5893cf80..c08047e02b7144b740892989217b6e21b17837b6 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "access/heapam.h"
 #include "access/hio.h"
+#include "access/htup_details.h"
 #include "access/visibilitymap.h"
 #include "storage/bufmgr.h"
 #include "storage/freespace.h"
index e0209c9aeaff08cc3bc6f96a82cf0d741ee69b0d..97a2868f194920580ae7c6fafc7dec4bdd5e7577 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/heapam.h"
 #include "access/heapam_xlog.h"
 #include "access/transam.h"
+#include "access/htup_details.h"
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
index 2a60c62dd4d7a233ee0a4422f5fac05b559e6727..29a2ee6d393acfc110f6b1aa673ca6941194302b 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "access/subtrans.h"
 #include "access/transam.h"
 #include "access/twophase.h"
index 6a446e96889f0fa72d0f2e3209585eaa19f9cd4a..d3457615986080634ba0f25b6d6537c8aa86683c 100644 (file)
@@ -16,6 +16,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xlog.h"
 #include "access/xlog_internal.h"
 #include "access/xlogutils.h"
index b7428829f372330227eda53c858f47c467a45f35..34ddebbc0b97bf402ef85d739556317770b46f01 100644 (file)
@@ -21,6 +21,7 @@
 #include <getopt.h>
 #endif
 
+#include "access/htup_details.h"
 #include "bootstrap/bootstrap.h"
 #include "catalog/index.h"
 #include "catalog/pg_collation.h"
index b097813a063145e82353586d05cead41280f14d9..4e4c7af4c475dd07338e96ebdf322bf4be2d0e18 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
index 7d07c56cd0b2004191b80a013064b783bb5238bf..87d6f0242149a0cebc9b82545566eca9ddeb909c 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
index a08830121f68b652fabdfca678f4328350a7ee75..c80df418fafeff925e4687b0b2cb7dce92e75dd5 100644 (file)
@@ -29,6 +29,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/xact.h"
index ee049857a2f2d623707d0cc1b28aa4f327bebcf2..ce367ac308e4be98fe3169080bbbccfe356fc5e8 100644 (file)
@@ -15,6 +15,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/index.h"
 #include "catalog/indexing.h"
 #include "executor/executor.h"
index 10ad82b79e93c423f9dd73a39e433602f6fc5d83..b559f5533b35726dfbd81bf077f89d0ddcf052dd 100644 (file)
@@ -19,6 +19,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/pg_authid.h"
index 5b8140b0ae709cb2bc29f7412717ede3fc3e39cc..c1e5e1db777f7681ad2de6f5a8462584fb3357a2 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/catalog.h"
 #include "catalog/indexing.h"
index 403c6f03a630b2079144bd70433cf7f4b2b1d69b..2e12c5a3d542506fb9b9cfe2826c8155771c712d 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_aggregate.h"
index 18c7acf0e81ffe2582cea769dfe2b8122a2fab4d..6020d16c74db02583254f2637fadbee9c3d16228 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 224859d76e76e6b577c4fca786033660698953ca..8df3f18e300fb42d7b17d82e294b5de413070742 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaccess.h"
index 358bd39bb05b32e93fb73f7c05271b49f6fb069a..68f1aa76e2138a5bd823e4d5187f678f96d8d837 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index d865b6875d37b01ca1b897af9536e3bafcf83c0c..616980ce89b8499982f7dafc2fe5c5dff483ff0b 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_db_role_setting.h"
 #include "utils/fmgroids.h"
index 8e584356064f1a309754914c273b80505dd94137..9a5931692f22feffd6b54f2fb44013ab1db8113d 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_constraint.h"
index 20e26c47ca45fa2f6e26957295d54687438e0431..8ddb376bc16875130d2efea05c8959fc7c5ecdbd 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/indexing.h"
index 146c845c94fc2d644135c58bb822ca92e839e9a5..d34fed85f8b3244026fa1098e9f0a65988ad952c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_inherits.h"
 #include "catalog/pg_inherits_fn.h"
index 1e5de6acad934718beb0bc60f8a813e851a4b10c..33220341401e2c2ee0971670e47651328483772b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index de856760f08b37427bbdda04dd12306a0d629e0f..098df224a8d21a5d3ef83d79c659fec49b9adfaf 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaccess.h"
index 4fd55ae570607d97c538762f1ba0955257741e14..88af345fab9cdb0c4f4ba0b5368b0c407e411277 100644 (file)
@@ -18,6 +18,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index ac53b09af6badb6326c5c32ea621adab283b3555..ba73264c60c37ee7483c09deb4bdef464456af2a 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 7e52d0d01756863c2b11922d88470763301d61a9..a24df23fbf87011ee7370bd344ff9bf33c9d4949 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_collation.h"
index 23111eccc5d869a1ab5b4c2c34673b547f1f39c3..5a73b48ea766781395f5f4de56fcfee7172166c3 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
index 6062926e6049736b605c62a4d3761603c04bfc91..49133eee8c697df848c4296036e6a427f9eb52ce 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index c0dcdf7ac56cdcfcea47ef77bdf6fd6622d46f2a..57adfe8a9ae68573a4b67e1d479514c262c18b9e 100644 (file)
@@ -23,6 +23,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_aggregate.h"
index 19f989549c782b5adea4fa1dd74d2098efc65128..e5b813d19a0299181e6fe44868c4d91606df4926 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
index e574288c2c53769857df33b38b8a6e278fd0d26e..ad7528828bd6941d85e40b9e0798618092bf9fb1 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 7ea367571e64cd3382402c0ef6e03e25d2bd25c6..267694f5b9a04d47642e7974955227ba9b6422c0 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaddress.h"
 #include "catalog/pg_description.h"
index aad7e46261e9f2c864b001a2d49baa7c9d82cf4d..e36c91ade19f7cce04da3bf04f27fd3ccb9987e3 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_conversion.h"
index e8a125b1a584180400175d103fbb9e2bae36d553..0567ab003d4288d6be3a04cabd69dd5be3fe68c0 100644 (file)
@@ -21,6 +21,7 @@
 #include <arpa/inet.h>
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/namespace.h"
index dc0665e2a4137c9e76ded4158949c2ac36893580..07ee6b309148a755bdda4730819e2a3b7e54ac90 100644 (file)
@@ -22,6 +22,7 @@
 #include "postgres.h"
 
 #include "access/reloptions.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/toasting.h"
index 2192573173850950025d43cdaf8a413d96693692..cdbce97c4ff2f2d2c65ef78c239215d625ff1abc 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "access/xlogutils.h"
 #include "catalog/catalog.h"
index 8f5d7e0ed2b0265622cb60252f89b88bfb916f64..1a569d91ece30c64e35edbdbbd3485919dcfb3ce 100644 (file)
@@ -16,6 +16,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/namespace.h"
 #include "catalog/objectaddress.h"
index d725360b8645b51f4fb7f193dfbb1d6db0a04fe4..cb4e658a584e4a246a10be263d13b0b41009172c 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 0901601fb7e556e7dbe09b750714f129248caeb2..ec8aa178923b5ed02bbd79687110069beee40d53 100644 (file)
@@ -27,6 +27,7 @@
 #include <limits.h>
 #include <unistd.h>
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
index 342ecc293185b13dd0b73003ba49981a9f758f1c..f10cb5252d927cae27c4d135adc760c11eb162b9 100644 (file)
@@ -14,6 +14,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "access/reloptions.h"
 #include "catalog/dependency.h"
index dcadb3dc84a257eb3b3638038f591d8eefd96f98..bf040730fa05c5f6f63adeb5849d93f6144f425f 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index f677268609186f3f52921800228657f805f7b089..a58101ec6e5822d15b859c78bdf1585b11229562 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
index f5642447f12280edacbdd7d3a0a5d944b2b8d1fb..7cf4db05115ead6316083a3d0d39b1f98af28f9f 100644 (file)
@@ -20,6 +20,7 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/nbtree.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 410c708975f487fbfc18389b950deafbbe8287c7..e0ac0e113b414dd799d958583db6dab0eaec86a6 100644 (file)
@@ -35,6 +35,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_operator.h"
index 354389c617f921affa6e5e383c2caebde7e292f9..31139bdcb9590f80524764fac14440e7131c37a0 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaccess.h"
index 4974025cc334dba66208e803b9433629912e8ac1..b11c38d0b8bf65a11e4f49e26634111a6c231430 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
index c09a96e9f6cb813228babfc7b7ce78f111851f21..91f41a1cd700cde8a35a540fa9acb9a573dd832f 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/catalog.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_seclabel.h"
index fbb6489915ec4068e77805829f4058b1dd6f82bf..4f55830ae4d3319b9dd102404a1f19aeeeebd174 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/transam.h"
+#include "access/htup_details.h"
 #include "access/xlogutils.h"
 #include "catalog/dependency.h"
 #include "catalog/namespace.h"
index da9cb2f30e955fa4c99b30c119867df45db0b3cd..d1718c15138f74ca888f6dfc14b49d9073b3f1e9 100644 (file)
@@ -53,6 +53,7 @@
 
 #include "access/heapam.h"
 #include "access/reloptions.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
index e7576fc9ea9e5644e956028d558d8453b5e6950b..4d3ed9cb62c3b9353a3bacd4f5270f63e9d1e5cc 100644 (file)
@@ -16,6 +16,7 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/sysattr.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
index 86cb8704da811ed9cd3bd2bbd5e2d7dae1a70c70..487c7fb1a256ff5afa64564534a09917c47e3c51 100644 (file)
@@ -17,8 +17,9 @@
 
 #include <ctype.h>
 
-#include "access/heapam.h"
 #include "access/genam.h"
+#include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 7fc3ad7e73609c5fcf5c45cd9f2de99a67f5602c..88e4287492d89ad2e33879e4465959c96a637798 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
index a22092c202c4a11b653edac9417afa6e36bfe4f5..f178167d629d85b478f598c439bd563050b9564c 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 710c2afc9f3c3b14beb526b82db72edea1ddb890..14d1c08c9738184b70b9bff27798bcfef9c5783a 100644 (file)
@@ -25,6 +25,7 @@
 #include "access/clog.h"
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "access/xact.h"
 #include "catalog/namespace.h"
index 703b476bdfd5cf5688f69e92e62a3b772c91baf7..c9253a9c479cde46ebd7aeb42da886412df297b4 100644 (file)
@@ -40,6 +40,7 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/heapam_xlog.h"
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "access/visibilitymap.h"
 #include "catalog/storage.h"
index 5d894ba77f74d02637008deedd4ca2919d8af6b8..3b55e595af9e62ec75a7752c8fe9d1b073a062b4 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_authid.h"
 #include "commands/variable.h"
index e54d51e3d2507a23bd1284a25a227f6ea99a1aa0..cf4943d8bed1fa8d52f0e09ef5fa5000204c40d9 100644 (file)
@@ -12,6 +12,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "executor/execdebug.h"
 #include "executor/nodeAgg.h"
 #include "executor/nodeAppend.h"
index 440438b1807ef684ca56f094108f465bda1e55c5..d966be543e407c5d9d06d96604b05988d5afed2c 100644 (file)
@@ -37,6 +37,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/xact.h"
index 85c8d15560f6c040ffd4ac769fd5c266e923cb8a..56b106abda7bf1f85a1d9c8d9a43fa9cf6004934 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/nbtree.h"
 #include "access/tupconvert.h"
 #include "catalog/pg_type.h"
index e755e7c4f07205db72687656d96ad7615adc04ce..530ddff462581f36b2a1e5efe39dbc9e5e824b14 100644 (file)
@@ -88,6 +88,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "funcapi.h"
 #include "catalog/pg_type.h"
 #include "nodes/nodeFuncs.h"
index fc0bcb4bcedf1d0b1e2eabf1e8e5dfcab70a1c18..c90521246a5df3ed6f305f181fe43fa1c4efb4f2 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
index c9aa9211036828ed77e6dc90fe51603f43f3f677..38c71415fb515ef50a7de824e79efc227d920734 100644 (file)
@@ -78,6 +78,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
index cabe663a964d0ef95026928f809fcb7ff51b88df..c90fe40b3c9b21073943b2b32117069052917e87 100644 (file)
@@ -24,6 +24,7 @@
 #include <math.h>
 #include <limits.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_statistic.h"
 #include "commands/tablespace.h"
 #include "executor/execdebug.h"
index 0ea490b5786d731fbef934aabeef4b7d4997f41a..5bcf5f1f8be948279ce2f162d8d9bf9a3006a3fa 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "executor/executor.h"
 #include "executor/hashjoin.h"
 #include "executor/nodeHash.h"
index d2a33cb35682e23168d509cffe5f5f179f25249b..ec0825b460f48894355b6cf64f7d50f7cce9d026 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "executor/executor.h"
 #include "executor/nodeLockRows.h"
index a7bce75f0cb63c78d59306261bae5dd093a120fc..26a59d0121dec80de0a96b0217fc7e4b594efe66 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "commands/trigger.h"
 #include "executor/executor.h"
index 362f4466e4494b2ec3365394b72c06d8ecfb7d92..cd3e4e277ce8c35a5c13669cb1c65034205b064a 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "executor/executor.h"
 #include "executor/nodeSetOp.h"
 #include "utils/memutils.h"
index 474758140b62e7566c9f22ed4d64cc0686fee295..d615b78373ddc8a740037adbd130577df108094e 100644 (file)
@@ -21,6 +21,7 @@
 #include <limits.h>
 #include <math.h>
 
+#include "access/htup_details.h"
 #include "executor/executor.h"
 #include "executor/nodeSubplan.h"
 #include "nodes/makefuncs.h"
index ce89ff2ebf9296e4c23eb633929c0a0a08e192c5..ade9b57d28722e756ab66a1f3efe63edcec7096a 100644 (file)
@@ -33,6 +33,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
index 7c0da8873a77140ecf3c8356317848c12c27f86a..70d600490507f6797a5d4079f5cb51ad19d28018 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/printtup.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
index 6f9f77cc11f5e238b481866484ee2009507b20af..d8845aa8974748c6d81e77f4cb7331751326df43 100644 (file)
@@ -12,6 +12,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "catalog/pg_foreign_data_wrapper.h"
 #include "catalog/pg_foreign_server.h"
index 728619e75dada1f9effd54f5fe85e392b1d051d9..202eacf44515d1fa26d12faaead38ab35fb8ff38 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <limits.h>
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "nodes/bitmapset.h"
 #include "nodes/tidbitmap.h"
 #include "utils/hsearch.h"
index 223a0616fa0fe0e0460d4724bb782f9b62ddcc4f..3e99b230f5be482389405b0f7adcd7820d41616e 100644 (file)
@@ -70,6 +70,7 @@
 
 #include <math.h>
 
+#include "access/htup_details.h"
 #include "executor/executor.h"
 #include "executor/nodeHash.h"
 #include "miscadmin.h"
index 373f65b76fe5d3c5f72f911af82aec136bbfd572..55a5ed7b4c6320886e1e0d36d7a6aa857efc25e2 100644 (file)
@@ -28,6 +28,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_type.h"
 #include "nodes/makefuncs.h"
index 6170d48892e41b059d9e09cef5017a2dea294123..0540afaced00ce5807e6d8fe56ed5a15397e2272 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <limits.h>
 
+#include "access/htup_details.h"
 #include "executor/executor.h"
 #include "executor/nodeAgg.h"
 #include "miscadmin.h"
index 863c943f2a0ac06585443782e27cc525c311a054..4c2e82128181b8bbbfb4c527b0db8eed1714b6df 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_type.h"
 #include "executor/executor.h"
index 2e50cb7548c4052bdaf065f22ba63bff1b4313b8..94373b087c3ec2fe572a51e34321bc773c66ec20 100644 (file)
@@ -31,6 +31,7 @@
 #include <limits.h>
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/pg_inherits_fn.h"
 #include "catalog/pg_type.h"
index c339f132289050941fd5491aaf27e3f02785c433..fa6817c9148439116e211aec0582f4a190654faa 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_language.h"
 #include "catalog/pg_operator.h"
index 71e1e73b0c6eb30e215156b4348382ae3a0afcc5..25f8785b6395cf913357774cd733b39aa65e3b3e 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/xlog.h"
index a1caf74fc53406baeb0fa996b02f6485c8d691ed..f477730ad53d297b01d1132c54117002a67c4500 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_cast.h"
 #include "catalog/pg_class.h"
 #include "catalog/pg_inherits_fn.h"
index 2b1a13a693ef6f65d4a37e2abe8bb14091bfc07f..8bd88b022ff252563e64a5fe2b8099687d6600a4 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
index 6aaeae76b0a68b4988a15524b687ff53f4a50011..2e9fad0f9777eba7b1c4611d78db5de136c74232 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "mb/pg_wchar.h"
 #include "nodes/makefuncs.h"
index bb5f04031d523e89ecd9ae5cdbe098202043f228..c92a976d24a1ff42cc50b2dc2b8085557ddb07e1 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_type.h"
 #include "lib/stringinfo.h"
index d9c73ae5a7c363257bdef126e473c0a5482881fb..36d95eb9ee974012f8aad940191681ecce200469 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/heap.h"
 #include "catalog/namespace.h"
index cf2ff0cf70a98ca50fbf697c8ff8e8dd75899599..978ec7c973123445daf509804e981a9452e77c4b 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "lib/stringinfo.h"
index accda01f4574d0d5a439fcdf4bc49e6ac16449e5..95c57e81b584e9e5c82a2efb3a626632c6753cfd 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "catalog/dependency.h"
 #include "catalog/heap.h"
index dd8690577cb2841e9a88f1074c38bce0b75a2d05..74db821387c644d04c6457f56388f4f09d84a590 100644 (file)
@@ -68,6 +68,7 @@
 #include <unistd.h>
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "access/transam.h"
 #include "access/xact.h"
index 2371cd2ff9b01d2a6df5f0c421567f63f7decef5..8389d5c4ae932a24d22a8d3fe20920a2bdede7c8 100644 (file)
@@ -32,6 +32,7 @@
 #include "pgstat.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "access/twophase_rmgr.h"
 #include "access/xact.h"
index 971d277b7694a1fe689a654f742ee1c769cbd9d0..8efc9fc9d521b6f72f620d8429a17f7b60036378 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 2c2e8fa08bfea6baad3a6d3018acc06989edd693..c77591ab072d1c417da9558416cadfc32e361559 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 3f9b5e6063eaebb21f4be57de6c40ffa97aad680..79b940fd2141e86d57119dda3d0f93ed3e995df8 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_rewrite.h"
 #include "rewrite/rewriteSupport.h"
index 7840adb3501c8b4ab83ef9572c8ed8e01473ce11..8889fe1ecbb615d227550d2504758deda631196c 100644 (file)
@@ -23,7 +23,7 @@
  */
 #include "postgres.h"
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "access/xlogutils.h"
 #include "miscadmin.h"
 #include "storage/freespace.h"
index 8b5a95ceaa0ff460d34231dadc2d3562fa7b0c63..f164cfd3fea30b37b6b694146b10f0be5f5a0ad7 100644 (file)
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/slru.h"
 #include "access/subtrans.h"
 #include "access/transam.h"
index 90a731cc3ae6855b62a67ef60c9d0dd447c8c768..7bcee9b2d18bf4a039dacb345384fb9b92cb2e0b 100644 (file)
@@ -14,7 +14,7 @@
  */
 #include "postgres.h"
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 
 
 /* ----------------------------------------------------------------
index 5c0620689e39dc3c1cbde1f618cf0ff16b31c205..48a50630a1589defb564c1fd640b193f5cf18295 100644 (file)
@@ -20,6 +20,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_proc.h"
 #include "libpq/libpq.h"
index ce50560dd6bce83e52912bffcc550728e160635d..ce8a8b1c1641e7ee90c8ebd39d089bd975287431 100644 (file)
@@ -16,6 +16,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "access/twophase.h"
 #include "access/xact.h"
index a07d410005460cc92d6b42f013d0aba7608a9fc9..8d47bbceb38d86bf8542bc371dd9815da39e1b8a 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_statistic.h"
 #include "catalog/pg_type.h"
 #include "miscadmin.h"
index d5903b1f043770978b65157865b5b6ae62847b0e..fc8e287203cadd6e466f47b946eec1a6679ac113 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_authid.h"
 #include "catalog/pg_auth_members.h"
index 1b7d46f85867c18492188f14d18f8107d72118bd..622d6d13ceeba7e0ac921ea41ece85bc615fe247 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <math.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_statistic.h"
index e14906fd98da0e96190de9bff798f9b53cc04fde..a4b63951923f646008dc650b09a81212d9183a90 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
 #include "utils/array.h"
index c29b8e1019168d5c610b63da6f88526977e49217..d827d7d1463c7a5d80495bf6b9a71f143a9a133f 100644 (file)
@@ -19,6 +19,7 @@
 #include <limits.h>
 #include <math.h>
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
index 2ccdc0cee6e598ac6871a9a094353c32c3817044..cd23334a1a5118269f96428c54c27bdef1db7012 100644 (file)
@@ -15,6 +15,7 @@
 #include <sys/stat.h>
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/catalog.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_tablespace.h"
index de46f4c55fb26c7cf6dcaae975e5b9598c3737e2..9388f7848ece1533e5271a1ae03921a8a112ca10 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_enum.h"
 #include "libpq/pqformat.h"
index 952f0a01c14757ba2f8dbed697eb3e087af42098..4e757166b53a97e1d87a3c531d18be62713a84d4 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "utils/builtins.h"
index e50ff6393fc4740f8ef02b043491e470d902e2a1..4450676802b271080fa53e5c1d31c6e89746aa76 100644 (file)
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #include <dirent.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "mb/pg_wchar.h"
index 0425ac6242f0dee2dc7ca940670b87b4e0107bde..c700da4221865d678bbb12d0f0a01c99bf2ea07a 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "executor/spi.h"
 #include "lib/stringinfo.h"
index 33c5b64f50ac9b8f05a64f4e3a985d4cee2ceaca..dfa37a9576a78cba4db5d5f286b806727f844d0f 100644 (file)
@@ -12,6 +12,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "miscadmin.h"
index de881bf6344908ab861ac36897c9183313b7437d..92ea4413cc3e1d2a59257791711de2a38f31464a 100644 (file)
@@ -54,6 +54,7 @@
 #include <locale.h>
 #include <time.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_control.h"
 #include "mb/pg_wchar.h"
index 7c0705abcc9eb355e2df71b5ec9e11e81ce9f7ec..7d4059f1cbbe8a81818da7ad3683b2cb7061b94e 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "libpq/ip.h"
index ab2c6d696443020640dfca353968da9a82aab45a..7e20940ae72bb29cb2d236c07b1cdcf9299ccfe9 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_statistic.h"
 #include "utils/lsyscache.h"
index 11b3f571935f8778b4177228e500de7df5094ad7..a15f670f1467b624c7e6628714830c2feffb7da4 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_class.h"
index 983f631234b8147e6d98e4819833eaa3dab85fd4..97e68b1b6cb2826e7f6fa2955cb3905109db4572 100644 (file)
@@ -30,8 +30,9 @@
 
 #include "postgres.h"
 
-#include "access/xact.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
+#include "access/xact.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_constraint.h"
 #include "catalog/pg_operator.h"
index ba7fde43132cde28c6db5df53101d12b9560632e..13e574d4e82b4412f7ab32e02398d1671d381097 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "libpq/pqformat.h"
 #include "utils/builtins.h"
index ae6278432fd41ea5a48f4c6fd8c45fa1a1deb528..08396431384a8f8581492304c8c916c41e4b9516 100644 (file)
@@ -18,6 +18,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
index 40e1bebac1602a19f31606f529a9dbb0ffd7a043..2ab26dea290ec7ebf8f84a7c1d1580a5068fea30 100644 (file)
 #include <math.h>
 
 #include "access/gin.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/index.h"
 #include "catalog/pg_collation.h"
index a7e3ae9b0f44f877dceae60bb9d737881d2a5bdc..81c799d94fb3d4614b400a0a11bcea222e682557 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "commands/trigger.h"
 #include "utils/builtins.h"
 #include "utils/rel.h"
index 2bcf5b8aa8c2a184484afa2826af3d6332bbe766..2378d27324d037c7bca3ca4fc3a96fa511d27f0a 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "postgres.h"
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "libpq/pqformat.h"
 #include "nodes/nodeFuncs.h"
 #include "utils/array.h"
index 2d945b9cdba5a86dea7e5eda7c3357311648bf3b..051d4036816f6c68573f0d29e785c7cb72f84577 100644 (file)
@@ -67,6 +67,7 @@
 #endif
 #endif   /* USE_LIBXML */
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "commands/dbcommands.h"
index 6707ea1f822a5c4299edf36d042c05de8978eab7..0dd53110cec30fcb28b7c714ffd073580d208e2a 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "catalog/pg_event_trigger.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_type.h"
index 15b1711109cc0f84314677075d74c3571cf3382a..e26bf0bce477c5d04b9a330024763fcdfad7b9c8 100644 (file)
@@ -95,6 +95,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "miscadmin.h"
index 0e479e80e1cf7f96e3fcec5c68463fa79e0ea0df..b2ae36540353b7aac6de975bdb045d77cfad8c12 100644 (file)
@@ -16,6 +16,7 @@
 #include "postgres.h"
 
 #include "access/hash.h"
+#include "access/htup_details.h"
 #include "access/nbtree.h"
 #include "bootstrap/bootstrap.h"
 #include "catalog/pg_amop.h"
index 0f26b34bc4d3a7eb60abcafd46c91e29dda9c08f..0cdd30d15b1167da4b79984d0412b9b5797e8a9b 100644 (file)
@@ -33,6 +33,7 @@
 #include "access/reloptions.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/index.h"
index 1967895873b22bf883c3d13dd5b85f09043e6673..ca22efd7651efe09463a19a0010045c187c56ceb 100644 (file)
@@ -20,6 +20,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_aggregate.h"
index b369790bde6b23d7fdab17b87b1dc2925e0ade3a..c907c8fe690735901e3e1e2b5ddd81e414210f43 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
index 9af5e8685596b6c503054bd49372c2b31ab8190c..e3b8ca907f03ec8bffd76ffb48636dac47fed140 100644 (file)
@@ -47,6 +47,7 @@
 
 #include "access/hash.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/nbtree.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_enum.h"
index addf95bca9b1b03ffede8318c4f8e49799c4d685..e6cec7f13cb7500e29c8858765042eb85c6fa854 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
index 9a0f92c268201103c3eb605db11d0129b97180f2..5288aa77ee104fd271d8895e85d5354bb43bb68d 100644 (file)
@@ -29,6 +29,7 @@
 #include <utime.h>
 #endif
 
+#include "access/htup_details.h"
 #include "catalog/pg_authid.h"
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
index bef301a79c8fea1f602f5bd8b340bb4950d285fa..757e76bd7af90e85d704c49db1e53d65e487eb75 100644 (file)
@@ -20,6 +20,7 @@
 #include <unistd.h>
 
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
index 9accb9d56b01f297e228e307927af25b013d768c..dc574daed120c35968c07747ac7f9c4394079d79 100644 (file)
@@ -20,6 +20,7 @@
  */
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_authid.h"
 #include "utils/inval.h"
 #include "utils/syscache.h"
index d5a2003e5b896d27bdc46bcab75dc3c38eb48382..ce27e404be9f656c4448e04bb650fa4256642491 100644 (file)
 
 #include <limits.h>
 
+#include "access/htup_details.h"
 #include "access/nbtree.h"
 #include "catalog/index.h"
 #include "commands/tablespace.h"
index 8a7931b856605fc46c8f9ea886cabe88fbb3e9ca..1b1cf35623e3bf587e9c378ca982485bce7e000f 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "commands/tablespace.h"
 #include "executor/executor.h"
 #include "storage/buffile.h"
index 5429922d3f15e1b4a45b7408b356931270a03990..f91e7faab52e9d254a69f2776f5f6002a2a8085e 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "postgres.h"
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "utils/combocid.h"
 #include "utils/hsearch.h"
index 4caef9ca25e5322ba12926f8527bcf94a26745ee..b531db5087cee94d703560fa656bc7c7bc95f8ce 100644 (file)
@@ -57,6 +57,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/multixact.h"
 #include "access/subtrans.h"
 #include "access/transam.h"
index 2d73ae8fb881b4eeded5c420f974f98df651a2b7..a4ab0627a0d63cf5721f1c05735a404ebafc47ed 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/sdir.h"
 #include "access/skey.h"
 #include "nodes/primnodes.h"
+#include "storage/bufpage.h"
 #include "storage/lock.h"
 #include "utils/relcache.h"
 #include "utils/snapshot.h"
index 4ccea5ce4e896c248cc7bd56a2afe30b483684df..8ec710e85f673ec179d603af2265b01f1ae9a77e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/htup.h"
 #include "access/xlog.h"
+#include "storage/bufpage.h"
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
index 74cad2bb2b370a55dd9907ff4ef83e35b88982e2..53b711046c0e017c727e10da74e4b2574a9554e0 100644 (file)
 #ifndef HTUP_H
 #define HTUP_H
 
-#include "access/tupdesc.h"
-#include "access/tupmacs.h"
-#include "storage/bufpage.h"
 #include "storage/itemptr.h"
-#include "storage/relfilenode.h"
 
-/*
- * MaxTupleAttributeNumber limits the number of (user) columns in a tuple.
- * The key limit on this value is that the size of the fixed overhead for
- * a tuple, plus the size of the null-values bitmap (at 1 bit per column),
- * plus MAXALIGN alignment, must fit into t_hoff which is uint8.  On most
- * machines the upper limit without making t_hoff wider would be a little
- * over 1700.  We use round numbers here and for MaxHeapAttributeNumber
- * so that alterations in HeapTupleHeaderData layout won't change the
- * supported max number of columns.
- */
-#define MaxTupleAttributeNumber 1664   /* 8 * 208 */
-
-/*
- * MaxHeapAttributeNumber limits the number of (user) columns in a table.
- * This should be somewhat less than MaxTupleAttributeNumber.  It must be
- * at least one less, else we will fail to do UPDATEs on a maximal-width
- * table (because UPDATE has to form working tuples that include CTID).
- * In practice we want some additional daylight so that we can gracefully
- * support operations that add hidden "resjunk" columns, for example
- * SELECT * FROM wide_table ORDER BY foo, bar, baz.
- * In any case, depending on column data types you will likely be running
- * into the disk-block-based limit on overall tuple size if you have more
- * than a thousand or so columns.  TOAST won't help.
- */
-#define MaxHeapAttributeNumber 1600    /* 8 * 200 */
-
-/*
- * Heap tuple header.  To avoid wasting space, the fields should be
- * laid out in such a way as to avoid structure padding.
- *
- * Datums of composite types (row types) share the same general structure
- * as on-disk tuples, so that the same routines can be used to build and
- * examine them.  However the requirements are slightly different: a Datum
- * does not need any transaction visibility information, and it does need
- * a length word and some embedded type information.  We can achieve this
- * by overlaying the xmin/cmin/xmax/cmax/xvac fields of a heap tuple
- * with the fields needed in the Datum case.  Typically, all tuples built
- * in-memory will be initialized with the Datum fields; but when a tuple is
- * about to be inserted in a table, the transaction fields will be filled,
- * overwriting the datum fields.
- *
- * The overall structure of a heap tuple looks like:
- *                     fixed fields (HeapTupleHeaderData struct)
- *                     nulls bitmap (if HEAP_HASNULL is set in t_infomask)
- *                     alignment padding (as needed to make user data MAXALIGN'd)
- *                     object ID (if HEAP_HASOID is set in t_infomask)
- *                     user data fields
- *
- * We store five "virtual" fields Xmin, Cmin, Xmax, Cmax, and Xvac in three
- * physical fields.  Xmin and Xmax are always really stored, but Cmin, Cmax
- * and Xvac share a field.     This works because we know that Cmin and Cmax
- * are only interesting for the lifetime of the inserting and deleting
- * transaction respectively.  If a tuple is inserted and deleted in the same
- * transaction, we store a "combo" command id that can be mapped to the real
- * cmin and cmax, but only by use of local state within the originating
- * backend.  See combocid.c for more details.  Meanwhile, Xvac is only set by
- * old-style VACUUM FULL, which does not have any command sub-structure and so
- * does not need either Cmin or Cmax.  (This requires that old-style VACUUM
- * FULL never try to move a tuple whose Cmin or Cmax is still interesting,
- * ie, an insert-in-progress or delete-in-progress tuple.)
- *
- * A word about t_ctid: whenever a new tuple is stored on disk, its t_ctid
- * is initialized with its own TID (location). If the tuple is ever updated,
- * its t_ctid is changed to point to the replacement version of the tuple.
- * Thus, a tuple is the latest version of its row iff XMAX is invalid or
- * t_ctid points to itself (in which case, if XMAX is valid, the tuple is
- * either locked or deleted).  One can follow the chain of t_ctid links
- * to find the newest version of the row.  Beware however that VACUUM might
- * erase the pointed-to (newer) tuple before erasing the pointing (older)
- * tuple.  Hence, when following a t_ctid link, it is necessary to check
- * to see if the referenced slot is empty or contains an unrelated tuple.
- * Check that the referenced tuple has XMIN equal to the referencing tuple's
- * XMAX to verify that it is actually the descendant version and not an
- * unrelated tuple stored into a slot recently freed by VACUUM.  If either
- * check fails, one may assume that there is no live descendant version.
- *
- * Following the fixed header fields, the nulls bitmap is stored (beginning
- * at t_bits). The bitmap is *not* stored if t_infomask shows that there
- * are no nulls in the tuple.  If an OID field is present (as indicated by
- * t_infomask), then it is stored just before the user data, which begins at
- * the offset shown by t_hoff. Note that t_hoff must be a multiple of
- * MAXALIGN.
- */
-
-typedef struct HeapTupleFields
-{
-       TransactionId t_xmin;           /* inserting xact ID */
-       TransactionId t_xmax;           /* deleting or locking xact ID */
-
-       union
-       {
-               CommandId       t_cid;          /* inserting or deleting command ID, or both */
-               TransactionId t_xvac;   /* old-style VACUUM FULL xact ID */
-       }                       t_field3;
-} HeapTupleFields;
-
-typedef struct DatumTupleFields
-{
-       int32           datum_len_;             /* varlena header (do not touch directly!) */
+/* typedefs and forward declarations for structs defined in htup.h */
 
-       int32           datum_typmod;   /* -1, or identifier of a record type */
-
-       Oid                     datum_typeid;   /* composite type OID, or RECORDOID */
-
-       /*
-        * Note: field ordering is chosen with thought that Oid might someday
-        * widen to 64 bits.
-        */
-} DatumTupleFields;
-
-typedef struct HeapTupleHeaderData
-{
-       union
-       {
-               HeapTupleFields t_heap;
-               DatumTupleFields t_datum;
-       }                       t_choice;
-
-       ItemPointerData t_ctid;         /* current TID of this or newer tuple */
-
-       /* Fields below here must match MinimalTupleData! */
-
-       uint16          t_infomask2;    /* number of attributes + various flags */
-
-       uint16          t_infomask;             /* various flag bits, see below */
-
-       uint8           t_hoff;                 /* sizeof header incl. bitmap, padding */
-
-       /* ^ - 23 bytes - ^ */
-
-       bits8           t_bits[1];              /* bitmap of NULLs -- VARIABLE LENGTH */
-
-       /* MORE DATA FOLLOWS AT END OF STRUCT */
-} HeapTupleHeaderData;
+typedef struct HeapTupleHeaderData HeapTupleHeaderData;
 
 typedef HeapTupleHeaderData *HeapTupleHeader;
 
-/*
- * information stored in t_infomask:
- */
-#define HEAP_HASNULL                   0x0001  /* has null attribute(s) */
-#define HEAP_HASVARWIDTH               0x0002  /* has variable-width attribute(s) */
-#define HEAP_HASEXTERNAL               0x0004  /* has external stored attribute(s) */
-#define HEAP_HASOID                            0x0008  /* has an object-id field */
-/* bit 0x0010 is available */
-#define HEAP_COMBOCID                  0x0020  /* t_cid is a combo cid */
-#define HEAP_XMAX_EXCL_LOCK            0x0040  /* xmax is exclusive locker */
-#define HEAP_XMAX_SHARED_LOCK  0x0080  /* xmax is shared locker */
-/* if either LOCK bit is set, xmax hasn't deleted the tuple, only locked it */
-#define HEAP_IS_LOCKED (HEAP_XMAX_EXCL_LOCK | HEAP_XMAX_SHARED_LOCK)
-#define HEAP_XMIN_COMMITTED            0x0100  /* t_xmin committed */
-#define HEAP_XMIN_INVALID              0x0200  /* t_xmin invalid/aborted */
-#define HEAP_XMAX_COMMITTED            0x0400  /* t_xmax committed */
-#define HEAP_XMAX_INVALID              0x0800  /* t_xmax invalid/aborted */
-#define HEAP_XMAX_IS_MULTI             0x1000  /* t_xmax is a MultiXactId */
-#define HEAP_UPDATED                   0x2000  /* this is UPDATEd version of row */
-#define HEAP_MOVED_OFF                 0x4000  /* moved to another place by pre-9.0
-                                                                                * VACUUM FULL; kept for binary
-                                                                                * upgrade support */
-#define HEAP_MOVED_IN                  0x8000  /* moved from another place by pre-9.0
-                                                                                * VACUUM FULL; kept for binary
-                                                                                * upgrade support */
-#define HEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN)
-
-#define HEAP_XACT_MASK                 0xFFE0  /* visibility-related bits */
-
-/*
- * information stored in t_infomask2:
- */
-#define HEAP_NATTS_MASK                        0x07FF  /* 11 bits for number of attributes */
-/* bits 0x3800 are available */
-#define HEAP_HOT_UPDATED               0x4000  /* tuple was HOT-updated */
-#define HEAP_ONLY_TUPLE                        0x8000  /* this is heap-only tuple */
-
-#define HEAP2_XACT_MASK                        0xC000  /* visibility-related bits */
-
-/*
- * HEAP_TUPLE_HAS_MATCH is a temporary flag used during hash joins.  It is
- * only used in tuples that are in the hash table, and those don't need
- * any visibility information, so we can overlay it on a visibility flag
- * instead of using up a dedicated bit.
- */
-#define HEAP_TUPLE_HAS_MATCH   HEAP_ONLY_TUPLE /* tuple has a join match */
-
-/*
- * HeapTupleHeader accessor macros
- *
- * Note: beware of multiple evaluations of "tup" argument.     But the Set
- * macros evaluate their other argument only once.
- */
-
-#define HeapTupleHeaderGetXmin(tup) \
-( \
-       (tup)->t_choice.t_heap.t_xmin \
-)
-
-#define HeapTupleHeaderSetXmin(tup, xid) \
-( \
-       (tup)->t_choice.t_heap.t_xmin = (xid) \
-)
-
-#define HeapTupleHeaderGetXmax(tup) \
-( \
-       (tup)->t_choice.t_heap.t_xmax \
-)
-
-#define HeapTupleHeaderSetXmax(tup, xid) \
-( \
-       (tup)->t_choice.t_heap.t_xmax = (xid) \
-)
-
-/*
- * HeapTupleHeaderGetRawCommandId will give you what's in the header whether
- * it is useful or not.  Most code should use HeapTupleHeaderGetCmin or
- * HeapTupleHeaderGetCmax instead, but note that those Assert that you can
- * get a legitimate result, ie you are in the originating transaction!
- */
-#define HeapTupleHeaderGetRawCommandId(tup) \
-( \
-       (tup)->t_choice.t_heap.t_field3.t_cid \
-)
-
-/* SetCmin is reasonably simple since we never need a combo CID */
-#define HeapTupleHeaderSetCmin(tup, cid) \
-do { \
-       Assert(!((tup)->t_infomask & HEAP_MOVED)); \
-       (tup)->t_choice.t_heap.t_field3.t_cid = (cid); \
-       (tup)->t_infomask &= ~HEAP_COMBOCID; \
-} while (0)
-
-/* SetCmax must be used after HeapTupleHeaderAdjustCmax; see combocid.c */
-#define HeapTupleHeaderSetCmax(tup, cid, iscombo) \
-do { \
-       Assert(!((tup)->t_infomask & HEAP_MOVED)); \
-       (tup)->t_choice.t_heap.t_field3.t_cid = (cid); \
-       if (iscombo) \
-               (tup)->t_infomask |= HEAP_COMBOCID; \
-       else \
-               (tup)->t_infomask &= ~HEAP_COMBOCID; \
-} while (0)
-
-#define HeapTupleHeaderGetXvac(tup) \
-( \
-       ((tup)->t_infomask & HEAP_MOVED) ? \
-               (tup)->t_choice.t_heap.t_field3.t_xvac \
-       : \
-               InvalidTransactionId \
-)
-
-#define HeapTupleHeaderSetXvac(tup, xid) \
-do { \
-       Assert((tup)->t_infomask & HEAP_MOVED); \
-       (tup)->t_choice.t_heap.t_field3.t_xvac = (xid); \
-} while (0)
-
-#define HeapTupleHeaderGetDatumLength(tup) \
-       VARSIZE(tup)
-
-#define HeapTupleHeaderSetDatumLength(tup, len) \
-       SET_VARSIZE(tup, len)
-
-#define HeapTupleHeaderGetTypeId(tup) \
-( \
-       (tup)->t_choice.t_datum.datum_typeid \
-)
-
-#define HeapTupleHeaderSetTypeId(tup, typeid) \
-( \
-       (tup)->t_choice.t_datum.datum_typeid = (typeid) \
-)
-
-#define HeapTupleHeaderGetTypMod(tup) \
-( \
-       (tup)->t_choice.t_datum.datum_typmod \
-)
-
-#define HeapTupleHeaderSetTypMod(tup, typmod) \
-( \
-       (tup)->t_choice.t_datum.datum_typmod = (typmod) \
-)
-
-#define HeapTupleHeaderGetOid(tup) \
-( \
-       ((tup)->t_infomask & HEAP_HASOID) ? \
-               *((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) \
-       : \
-               InvalidOid \
-)
-
-#define HeapTupleHeaderSetOid(tup, oid) \
-do { \
-       Assert((tup)->t_infomask & HEAP_HASOID); \
-       *((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) = (oid); \
-} while (0)
-
-/*
- * Note that we stop considering a tuple HOT-updated as soon as it is known
- * aborted or the would-be updating transaction is known aborted.  For best
- * efficiency, check tuple visibility before using this macro, so that the
- * INVALID bits will be as up to date as possible.
- */
-#define HeapTupleHeaderIsHotUpdated(tup) \
-( \
-       ((tup)->t_infomask2 & HEAP_HOT_UPDATED) != 0 && \
-       ((tup)->t_infomask & (HEAP_XMIN_INVALID | HEAP_XMAX_INVALID)) == 0 \
-)
-
-#define HeapTupleHeaderSetHotUpdated(tup) \
-( \
-       (tup)->t_infomask2 |= HEAP_HOT_UPDATED \
-)
-
-#define HeapTupleHeaderClearHotUpdated(tup) \
-( \
-       (tup)->t_infomask2 &= ~HEAP_HOT_UPDATED \
-)
-
-#define HeapTupleHeaderIsHeapOnly(tup) \
-( \
-  (tup)->t_infomask2 & HEAP_ONLY_TUPLE \
-)
-
-#define HeapTupleHeaderSetHeapOnly(tup) \
-( \
-  (tup)->t_infomask2 |= HEAP_ONLY_TUPLE \
-)
-
-#define HeapTupleHeaderClearHeapOnly(tup) \
-( \
-  (tup)->t_infomask2 &= ~HEAP_ONLY_TUPLE \
-)
-
-#define HeapTupleHeaderHasMatch(tup) \
-( \
-  (tup)->t_infomask2 & HEAP_TUPLE_HAS_MATCH \
-)
-
-#define HeapTupleHeaderSetMatch(tup) \
-( \
-  (tup)->t_infomask2 |= HEAP_TUPLE_HAS_MATCH \
-)
-
-#define HeapTupleHeaderClearMatch(tup) \
-( \
-  (tup)->t_infomask2 &= ~HEAP_TUPLE_HAS_MATCH \
-)
-
-#define HeapTupleHeaderGetNatts(tup) \
-       ((tup)->t_infomask2 & HEAP_NATTS_MASK)
-
-#define HeapTupleHeaderSetNatts(tup, natts) \
-( \
-       (tup)->t_infomask2 = ((tup)->t_infomask2 & ~HEAP_NATTS_MASK) | (natts) \
-)
-
-
-/*
- * BITMAPLEN(NATTS) -
- *             Computes size of null bitmap given number of data columns.
- */
-#define BITMAPLEN(NATTS)       (((int)(NATTS) + 7) / 8)
-
-/*
- * MaxHeapTupleSize is the maximum allowed size of a heap tuple, including
- * header and MAXALIGN alignment padding.  Basically it's BLCKSZ minus the
- * other stuff that has to be on a disk page.  Since heap pages use no
- * "special space", there's no deduction for that.
- *
- * NOTE: we allow for the ItemId that must point to the tuple, ensuring that
- * an otherwise-empty page can indeed hold a tuple of this size.  Because
- * ItemIds and tuples have different alignment requirements, don't assume that
- * you can, say, fit 2 tuples of size MaxHeapTupleSize/2 on the same page.
- */
-#define MaxHeapTupleSize  (BLCKSZ - MAXALIGN(SizeOfPageHeaderData + sizeof(ItemIdData)))
-
-/*
- * MaxHeapTuplesPerPage is an upper bound on the number of tuples that can
- * fit on one heap page.  (Note that indexes could have more, because they
- * use a smaller tuple header.)  We arrive at the divisor because each tuple
- * must be maxaligned, and it must have an associated item pointer.
- *
- * Note: with HOT, there could theoretically be more line pointers (not actual
- * tuples) than this on a heap page.  However we constrain the number of line
- * pointers to this anyway, to avoid excessive line-pointer bloat and not
- * require increases in the size of work arrays.
- */
-#define MaxHeapTuplesPerPage   \
-       ((int) ((BLCKSZ - SizeOfPageHeaderData) / \
-                       (MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)) + sizeof(ItemIdData))))
-
-/*
- * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of
- * data fields of char(n) and similar types.  It need not have anything
- * directly to do with the *actual* upper limit of varlena values, which
- * is currently 1Gb (see TOAST structures in postgres.h).  I've set it
- * at 10Mb which seems like a reasonable number --- tgl 8/6/00.
- */
-#define MaxAttrSize            (10 * 1024 * 1024)
-
-
-/*
- * MinimalTuple is an alternative representation that is used for transient
- * tuples inside the executor, in places where transaction status information
- * is not required, the tuple rowtype is known, and shaving off a few bytes
- * is worthwhile because we need to store many tuples. The representation
- * is chosen so that tuple access routines can work with either full or
- * minimal tuples via a HeapTupleData pointer structure.  The access routines
- * see no difference, except that they must not access the transaction status
- * or t_ctid fields because those aren't there.
- *
- * For the most part, MinimalTuples should be accessed via TupleTableSlot
- * routines.  These routines will prevent access to the "system columns"
- * and thereby prevent accidental use of the nonexistent fields.
- *
- * MinimalTupleData contains a length word, some padding, and fields matching
- * HeapTupleHeaderData beginning with t_infomask2. The padding is chosen so
- * that offsetof(t_infomask2) is the same modulo MAXIMUM_ALIGNOF in both
- * structs.   This makes data alignment rules equivalent in both cases.
- *
- * When a minimal tuple is accessed via a HeapTupleData pointer, t_data is
- * set to point MINIMAL_TUPLE_OFFSET bytes before the actual start of the
- * minimal tuple --- that is, where a full tuple matching the minimal tuple's
- * data would start.  This trick is what makes the structs seem equivalent.
- *
- * Note that t_hoff is computed the same as in a full tuple, hence it includes
- * the MINIMAL_TUPLE_OFFSET distance.  t_len does not include that, however.
- *
- * MINIMAL_TUPLE_DATA_OFFSET is the offset to the first useful (non-pad) data
- * other than the length word. tuplesort.c and tuplestore.c use this to avoid
- * writing the padding to disk.
- */
-#define MINIMAL_TUPLE_OFFSET \
-       ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) / MAXIMUM_ALIGNOF * MAXIMUM_ALIGNOF)
-#define MINIMAL_TUPLE_PADDING \
-       ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) % MAXIMUM_ALIGNOF)
-#define MINIMAL_TUPLE_DATA_OFFSET \
-       offsetof(MinimalTupleData, t_infomask2)
-
-typedef struct MinimalTupleData
-{
-       uint32          t_len;                  /* actual length of minimal tuple */
-
-       char            mt_padding[MINIMAL_TUPLE_PADDING];
-
-       /* Fields below here must match HeapTupleHeaderData! */
-
-       uint16          t_infomask2;    /* number of attributes + various flags */
-
-       uint16          t_infomask;             /* various flag bits, see below */
-
-       uint8           t_hoff;                 /* sizeof header incl. bitmap, padding */
-
-       /* ^ - 23 bytes - ^ */
-
-       bits8           t_bits[1];              /* bitmap of NULLs -- VARIABLE LENGTH */
-
-       /* MORE DATA FOLLOWS AT END OF STRUCT */
-} MinimalTupleData;
+typedef struct MinimalTupleData MinimalTupleData;
 
 typedef MinimalTupleData *MinimalTuple;
 
@@ -526,57 +71,11 @@ typedef HeapTupleData *HeapTuple;
 
 #define HEAPTUPLESIZE  MAXALIGN(sizeof(HeapTupleData))
 
-/*
- * GETSTRUCT - given a HeapTuple pointer, return address of the user data
- */
-#define GETSTRUCT(TUP) ((char *) ((TUP)->t_data) + (TUP)->t_data->t_hoff)
-
 /*
  * Accessor macros to be used with HeapTuple pointers.
  */
 #define HeapTupleIsValid(tuple) PointerIsValid(tuple)
 
-#define HeapTupleHasNulls(tuple) \
-               (((tuple)->t_data->t_infomask & HEAP_HASNULL) != 0)
-
-#define HeapTupleNoNulls(tuple) \
-               (!((tuple)->t_data->t_infomask & HEAP_HASNULL))
-
-#define HeapTupleHasVarWidth(tuple) \
-               (((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH) != 0)
-
-#define HeapTupleAllFixed(tuple) \
-               (!((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH))
-
-#define HeapTupleHasExternal(tuple) \
-               (((tuple)->t_data->t_infomask & HEAP_HASEXTERNAL) != 0)
-
-#define HeapTupleIsHotUpdated(tuple) \
-               HeapTupleHeaderIsHotUpdated((tuple)->t_data)
-
-#define HeapTupleSetHotUpdated(tuple) \
-               HeapTupleHeaderSetHotUpdated((tuple)->t_data)
-
-#define HeapTupleClearHotUpdated(tuple) \
-               HeapTupleHeaderClearHotUpdated((tuple)->t_data)
-
-#define HeapTupleIsHeapOnly(tuple) \
-               HeapTupleHeaderIsHeapOnly((tuple)->t_data)
-
-#define HeapTupleSetHeapOnly(tuple) \
-               HeapTupleHeaderSetHeapOnly((tuple)->t_data)
-
-#define HeapTupleClearHeapOnly(tuple) \
-               HeapTupleHeaderClearHeapOnly((tuple)->t_data)
-
-#define HeapTupleGetOid(tuple) \
-               HeapTupleHeaderGetOid((tuple)->t_data)
-
-#define HeapTupleSetOid(tuple, oid) \
-               HeapTupleHeaderSetOid((tuple)->t_data, (oid))
-
-
-
 /* HeapTupleHeader functions implemented in utils/time/combocid.c */
 extern CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup);
 extern CommandId HeapTupleHeaderGetCmax(HeapTupleHeader tup);
@@ -584,129 +83,4 @@ extern void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup,
                                                  CommandId *cmax,
                                                  bool *iscombo);
 
-/* ----------------
- *             fastgetattr
- *
- *             Fetch a user attribute's value as a Datum (might be either a
- *             value, or a pointer into the data area of the tuple).
- *
- *             This must not be used when a system attribute might be requested.
- *             Furthermore, the passed attnum MUST be valid.  Use heap_getattr()
- *             instead, if in doubt.
- *
- *             This gets called many times, so we macro the cacheable and NULL
- *             lookups, and call nocachegetattr() for the rest.
- * ----------------
- */
-
-#if !defined(DISABLE_COMPLEX_MACRO)
-
-#define fastgetattr(tup, attnum, tupleDesc, isnull)                                    \
-(                                                                                                                                      \
-       AssertMacro((attnum) > 0),                                                                              \
-       (*(isnull) = false),                                                                                    \
-       HeapTupleNoNulls(tup) ?                                                                                 \
-       (                                                                                                                               \
-               (tupleDesc)->attrs[(attnum)-1]->attcacheoff >= 0 ?                      \
-               (                                                                                                                       \
-                       fetchatt((tupleDesc)->attrs[(attnum)-1],                                \
-                               (char *) (tup)->t_data + (tup)->t_data->t_hoff +        \
-                                       (tupleDesc)->attrs[(attnum)-1]->attcacheoff)    \
-               )                                                                                                                       \
-               :                                                                                                                       \
-                       nocachegetattr((tup), (attnum), (tupleDesc))                    \
-       )                                                                                                                               \
-       :                                                                                                                               \
-       (                                                                                                                               \
-               att_isnull((attnum)-1, (tup)->t_data->t_bits) ?                         \
-               (                                                                                                                       \
-                       (*(isnull) = true),                                                                             \
-                       (Datum)NULL                                                                                             \
-               )                                                                                                                       \
-               :                                                                                                                       \
-               (                                                                                                                       \
-                       nocachegetattr((tup), (attnum), (tupleDesc))                    \
-               )                                                                                                                       \
-       )                                                                                                                               \
-)
-#else                                                  /* defined(DISABLE_COMPLEX_MACRO) */
-
-extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
-                       bool *isnull);
-#endif   /* defined(DISABLE_COMPLEX_MACRO) */
-
-
-/* ----------------
- *             heap_getattr
- *
- *             Extract an attribute of a heap tuple and return it as a Datum.
- *             This works for either system or user attributes.  The given attnum
- *             is properly range-checked.
- *
- *             If the field in question has a NULL value, we return a zero Datum
- *             and set *isnull == true.  Otherwise, we set *isnull == false.
- *
- *             <tup> is the pointer to the heap tuple.  <attnum> is the attribute
- *             number of the column (field) caller wants.      <tupleDesc> is a
- *             pointer to the structure describing the row and all its fields.
- * ----------------
- */
-#define heap_getattr(tup, attnum, tupleDesc, isnull) \
-       ( \
-               ((attnum) > 0) ? \
-               ( \
-                       ((attnum) > (int) HeapTupleHeaderGetNatts((tup)->t_data)) ? \
-                       ( \
-                               (*(isnull) = true), \
-                               (Datum)NULL \
-                       ) \
-                       : \
-                               fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
-               ) \
-               : \
-                       heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \
-       )
-
-/* prototypes for functions in common/heaptuple.c */
-extern Size heap_compute_data_size(TupleDesc tupleDesc,
-                                          Datum *values, bool *isnull);
-extern void heap_fill_tuple(TupleDesc tupleDesc,
-                               Datum *values, bool *isnull,
-                               char *data, Size data_size,
-                               uint16 *infomask, bits8 *bit);
-extern bool heap_attisnull(HeapTuple tup, int attnum);
-extern Datum nocachegetattr(HeapTuple tup, int attnum,
-                          TupleDesc att);
-extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
-                               bool *isnull);
-extern HeapTuple heap_copytuple(HeapTuple tuple);
-extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
-extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
-                               Datum *values, bool *isnull);
-extern HeapTuple heap_modify_tuple(HeapTuple tuple,
-                                 TupleDesc tupleDesc,
-                                 Datum *replValues,
-                                 bool *replIsnull,
-                                 bool *doReplace);
-extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
-                                 Datum *values, bool *isnull);
-
-/* these three are deprecated versions of the three above: */
-extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
-                          Datum *values, char *nulls);
-extern HeapTuple heap_modifytuple(HeapTuple tuple,
-                                TupleDesc tupleDesc,
-                                Datum *replValues,
-                                char *replNulls,
-                                char *replActions);
-extern void heap_deformtuple(HeapTuple tuple, TupleDesc tupleDesc,
-                                Datum *values, char *nulls);
-extern void heap_freetuple(HeapTuple htup);
-extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor,
-                                               Datum *values, bool *isnull);
-extern void heap_free_minimal_tuple(MinimalTuple mtup);
-extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
-extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
-extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup);
-
 #endif   /* HTUP_H */
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h
new file mode 100644 (file)
index 0000000..7abe3e6
--- /dev/null
@@ -0,0 +1,657 @@
+/*-------------------------------------------------------------------------
+ *
+ * htup_details.h
+ *       POSTGRES heap tuple header definitions.
+ *
+ *
+ * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/access/htup_details.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef HTUP_DETAILS_H
+#define HTUP_DETAILS_H
+
+#include "access/htup.h"
+#include "access/tupdesc.h"
+#include "access/tupmacs.h"
+#include "storage/bufpage.h"
+
+/*
+ * MaxTupleAttributeNumber limits the number of (user) columns in a tuple.
+ * The key limit on this value is that the size of the fixed overhead for
+ * a tuple, plus the size of the null-values bitmap (at 1 bit per column),
+ * plus MAXALIGN alignment, must fit into t_hoff which is uint8.  On most
+ * machines the upper limit without making t_hoff wider would be a little
+ * over 1700.  We use round numbers here and for MaxHeapAttributeNumber
+ * so that alterations in HeapTupleHeaderData layout won't change the
+ * supported max number of columns.
+ */
+#define MaxTupleAttributeNumber 1664   /* 8 * 208 */
+
+/*
+ * MaxHeapAttributeNumber limits the number of (user) columns in a table.
+ * This should be somewhat less than MaxTupleAttributeNumber.  It must be
+ * at least one less, else we will fail to do UPDATEs on a maximal-width
+ * table (because UPDATE has to form working tuples that include CTID).
+ * In practice we want some additional daylight so that we can gracefully
+ * support operations that add hidden "resjunk" columns, for example
+ * SELECT * FROM wide_table ORDER BY foo, bar, baz.
+ * In any case, depending on column data types you will likely be running
+ * into the disk-block-based limit on overall tuple size if you have more
+ * than a thousand or so columns.  TOAST won't help.
+ */
+#define MaxHeapAttributeNumber 1600    /* 8 * 200 */
+
+/*
+ * Heap tuple header.  To avoid wasting space, the fields should be
+ * laid out in such a way as to avoid structure padding.
+ *
+ * Datums of composite types (row types) share the same general structure
+ * as on-disk tuples, so that the same routines can be used to build and
+ * examine them.  However the requirements are slightly different: a Datum
+ * does not need any transaction visibility information, and it does need
+ * a length word and some embedded type information.  We can achieve this
+ * by overlaying the xmin/cmin/xmax/cmax/xvac fields of a heap tuple
+ * with the fields needed in the Datum case.  Typically, all tuples built
+ * in-memory will be initialized with the Datum fields; but when a tuple is
+ * about to be inserted in a table, the transaction fields will be filled,
+ * overwriting the datum fields.
+ *
+ * The overall structure of a heap tuple looks like:
+ *                     fixed fields (HeapTupleHeaderData struct)
+ *                     nulls bitmap (if HEAP_HASNULL is set in t_infomask)
+ *                     alignment padding (as needed to make user data MAXALIGN'd)
+ *                     object ID (if HEAP_HASOID is set in t_infomask)
+ *                     user data fields
+ *
+ * We store five "virtual" fields Xmin, Cmin, Xmax, Cmax, and Xvac in three
+ * physical fields.  Xmin and Xmax are always really stored, but Cmin, Cmax
+ * and Xvac share a field.     This works because we know that Cmin and Cmax
+ * are only interesting for the lifetime of the inserting and deleting
+ * transaction respectively.  If a tuple is inserted and deleted in the same
+ * transaction, we store a "combo" command id that can be mapped to the real
+ * cmin and cmax, but only by use of local state within the originating
+ * backend.  See combocid.c for more details.  Meanwhile, Xvac is only set by
+ * old-style VACUUM FULL, which does not have any command sub-structure and so
+ * does not need either Cmin or Cmax.  (This requires that old-style VACUUM
+ * FULL never try to move a tuple whose Cmin or Cmax is still interesting,
+ * ie, an insert-in-progress or delete-in-progress tuple.)
+ *
+ * A word about t_ctid: whenever a new tuple is stored on disk, its t_ctid
+ * is initialized with its own TID (location). If the tuple is ever updated,
+ * its t_ctid is changed to point to the replacement version of the tuple.
+ * Thus, a tuple is the latest version of its row iff XMAX is invalid or
+ * t_ctid points to itself (in which case, if XMAX is valid, the tuple is
+ * either locked or deleted).  One can follow the chain of t_ctid links
+ * to find the newest version of the row.  Beware however that VACUUM might
+ * erase the pointed-to (newer) tuple before erasing the pointing (older)
+ * tuple.  Hence, when following a t_ctid link, it is necessary to check
+ * to see if the referenced slot is empty or contains an unrelated tuple.
+ * Check that the referenced tuple has XMIN equal to the referencing tuple's
+ * XMAX to verify that it is actually the descendant version and not an
+ * unrelated tuple stored into a slot recently freed by VACUUM.  If either
+ * check fails, one may assume that there is no live descendant version.
+ *
+ * Following the fixed header fields, the nulls bitmap is stored (beginning
+ * at t_bits). The bitmap is *not* stored if t_infomask shows that there
+ * are no nulls in the tuple.  If an OID field is present (as indicated by
+ * t_infomask), then it is stored just before the user data, which begins at
+ * the offset shown by t_hoff. Note that t_hoff must be a multiple of
+ * MAXALIGN.
+ */
+
+typedef struct HeapTupleFields
+{
+       TransactionId t_xmin;           /* inserting xact ID */
+       TransactionId t_xmax;           /* deleting or locking xact ID */
+
+       union
+       {
+               CommandId       t_cid;          /* inserting or deleting command ID, or both */
+               TransactionId t_xvac;   /* old-style VACUUM FULL xact ID */
+       }                       t_field3;
+} HeapTupleFields;
+
+typedef struct DatumTupleFields
+{
+       int32           datum_len_;             /* varlena header (do not touch directly!) */
+
+       int32           datum_typmod;   /* -1, or identifier of a record type */
+
+       Oid                     datum_typeid;   /* composite type OID, or RECORDOID */
+
+       /*
+        * Note: field ordering is chosen with thought that Oid might someday
+        * widen to 64 bits.
+        */
+} DatumTupleFields;
+
+struct HeapTupleHeaderData
+{
+       union
+       {
+               HeapTupleFields t_heap;
+               DatumTupleFields t_datum;
+       }                       t_choice;
+
+       ItemPointerData t_ctid;         /* current TID of this or newer tuple */
+
+       /* Fields below here must match MinimalTupleData! */
+
+       uint16          t_infomask2;    /* number of attributes + various flags */
+
+       uint16          t_infomask;             /* various flag bits, see below */
+
+       uint8           t_hoff;                 /* sizeof header incl. bitmap, padding */
+
+       /* ^ - 23 bytes - ^ */
+
+       bits8           t_bits[1];              /* bitmap of NULLs -- VARIABLE LENGTH */
+
+       /* MORE DATA FOLLOWS AT END OF STRUCT */
+};
+/* typedef appears in tupbasics.h */
+
+/*
+ * information stored in t_infomask:
+ */
+#define HEAP_HASNULL                   0x0001  /* has null attribute(s) */
+#define HEAP_HASVARWIDTH               0x0002  /* has variable-width attribute(s) */
+#define HEAP_HASEXTERNAL               0x0004  /* has external stored attribute(s) */
+#define HEAP_HASOID                            0x0008  /* has an object-id field */
+/* bit 0x0010 is available */
+#define HEAP_COMBOCID                  0x0020  /* t_cid is a combo cid */
+#define HEAP_XMAX_EXCL_LOCK            0x0040  /* xmax is exclusive locker */
+#define HEAP_XMAX_SHARED_LOCK  0x0080  /* xmax is shared locker */
+/* if either LOCK bit is set, xmax hasn't deleted the tuple, only locked it */
+#define HEAP_IS_LOCKED (HEAP_XMAX_EXCL_LOCK | HEAP_XMAX_SHARED_LOCK)
+#define HEAP_XMIN_COMMITTED            0x0100  /* t_xmin committed */
+#define HEAP_XMIN_INVALID              0x0200  /* t_xmin invalid/aborted */
+#define HEAP_XMAX_COMMITTED            0x0400  /* t_xmax committed */
+#define HEAP_XMAX_INVALID              0x0800  /* t_xmax invalid/aborted */
+#define HEAP_XMAX_IS_MULTI             0x1000  /* t_xmax is a MultiXactId */
+#define HEAP_UPDATED                   0x2000  /* this is UPDATEd version of row */
+#define HEAP_MOVED_OFF                 0x4000  /* moved to another place by pre-9.0
+                                                                                * VACUUM FULL; kept for binary
+                                                                                * upgrade support */
+#define HEAP_MOVED_IN                  0x8000  /* moved from another place by pre-9.0
+                                                                                * VACUUM FULL; kept for binary
+                                                                                * upgrade support */
+#define HEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN)
+
+#define HEAP_XACT_MASK                 0xFFE0  /* visibility-related bits */
+
+/*
+ * information stored in t_infomask2:
+ */
+#define HEAP_NATTS_MASK                        0x07FF  /* 11 bits for number of attributes */
+/* bits 0x3800 are available */
+#define HEAP_HOT_UPDATED               0x4000  /* tuple was HOT-updated */
+#define HEAP_ONLY_TUPLE                        0x8000  /* this is heap-only tuple */
+
+#define HEAP2_XACT_MASK                        0xC000  /* visibility-related bits */
+
+/*
+ * HEAP_TUPLE_HAS_MATCH is a temporary flag used during hash joins.  It is
+ * only used in tuples that are in the hash table, and those don't need
+ * any visibility information, so we can overlay it on a visibility flag
+ * instead of using up a dedicated bit.
+ */
+#define HEAP_TUPLE_HAS_MATCH   HEAP_ONLY_TUPLE /* tuple has a join match */
+
+/*
+ * HeapTupleHeader accessor macros
+ *
+ * Note: beware of multiple evaluations of "tup" argument.     But the Set
+ * macros evaluate their other argument only once.
+ */
+
+#define HeapTupleHeaderGetXmin(tup) \
+( \
+       (tup)->t_choice.t_heap.t_xmin \
+)
+
+#define HeapTupleHeaderSetXmin(tup, xid) \
+( \
+       (tup)->t_choice.t_heap.t_xmin = (xid) \
+)
+
+#define HeapTupleHeaderGetXmax(tup) \
+( \
+       (tup)->t_choice.t_heap.t_xmax \
+)
+
+#define HeapTupleHeaderSetXmax(tup, xid) \
+( \
+       (tup)->t_choice.t_heap.t_xmax = (xid) \
+)
+
+/*
+ * HeapTupleHeaderGetRawCommandId will give you what's in the header whether
+ * it is useful or not.  Most code should use HeapTupleHeaderGetCmin or
+ * HeapTupleHeaderGetCmax instead, but note that those Assert that you can
+ * get a legitimate result, ie you are in the originating transaction!
+ */
+#define HeapTupleHeaderGetRawCommandId(tup) \
+( \
+       (tup)->t_choice.t_heap.t_field3.t_cid \
+)
+
+/* SetCmin is reasonably simple since we never need a combo CID */
+#define HeapTupleHeaderSetCmin(tup, cid) \
+do { \
+       Assert(!((tup)->t_infomask & HEAP_MOVED)); \
+       (tup)->t_choice.t_heap.t_field3.t_cid = (cid); \
+       (tup)->t_infomask &= ~HEAP_COMBOCID; \
+} while (0)
+
+/* SetCmax must be used after HeapTupleHeaderAdjustCmax; see combocid.c */
+#define HeapTupleHeaderSetCmax(tup, cid, iscombo) \
+do { \
+       Assert(!((tup)->t_infomask & HEAP_MOVED)); \
+       (tup)->t_choice.t_heap.t_field3.t_cid = (cid); \
+       if (iscombo) \
+               (tup)->t_infomask |= HEAP_COMBOCID; \
+       else \
+               (tup)->t_infomask &= ~HEAP_COMBOCID; \
+} while (0)
+
+#define HeapTupleHeaderGetXvac(tup) \
+( \
+       ((tup)->t_infomask & HEAP_MOVED) ? \
+               (tup)->t_choice.t_heap.t_field3.t_xvac \
+       : \
+               InvalidTransactionId \
+)
+
+#define HeapTupleHeaderSetXvac(tup, xid) \
+do { \
+       Assert((tup)->t_infomask & HEAP_MOVED); \
+       (tup)->t_choice.t_heap.t_field3.t_xvac = (xid); \
+} while (0)
+
+#define HeapTupleHeaderGetDatumLength(tup) \
+       VARSIZE(tup)
+
+#define HeapTupleHeaderSetDatumLength(tup, len) \
+       SET_VARSIZE(tup, len)
+
+#define HeapTupleHeaderGetTypeId(tup) \
+( \
+       (tup)->t_choice.t_datum.datum_typeid \
+)
+
+#define HeapTupleHeaderSetTypeId(tup, typeid) \
+( \
+       (tup)->t_choice.t_datum.datum_typeid = (typeid) \
+)
+
+#define HeapTupleHeaderGetTypMod(tup) \
+( \
+       (tup)->t_choice.t_datum.datum_typmod \
+)
+
+#define HeapTupleHeaderSetTypMod(tup, typmod) \
+( \
+       (tup)->t_choice.t_datum.datum_typmod = (typmod) \
+)
+
+#define HeapTupleHeaderGetOid(tup) \
+( \
+       ((tup)->t_infomask & HEAP_HASOID) ? \
+               *((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) \
+       : \
+               InvalidOid \
+)
+
+#define HeapTupleHeaderSetOid(tup, oid) \
+do { \
+       Assert((tup)->t_infomask & HEAP_HASOID); \
+       *((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) = (oid); \
+} while (0)
+
+/*
+ * Note that we stop considering a tuple HOT-updated as soon as it is known
+ * aborted or the would-be updating transaction is known aborted.  For best
+ * efficiency, check tuple visibility before using this macro, so that the
+ * INVALID bits will be as up to date as possible.
+ */
+#define HeapTupleHeaderIsHotUpdated(tup) \
+( \
+       ((tup)->t_infomask2 & HEAP_HOT_UPDATED) != 0 && \
+       ((tup)->t_infomask & (HEAP_XMIN_INVALID | HEAP_XMAX_INVALID)) == 0 \
+)
+
+#define HeapTupleHeaderSetHotUpdated(tup) \
+( \
+       (tup)->t_infomask2 |= HEAP_HOT_UPDATED \
+)
+
+#define HeapTupleHeaderClearHotUpdated(tup) \
+( \
+       (tup)->t_infomask2 &= ~HEAP_HOT_UPDATED \
+)
+
+#define HeapTupleHeaderIsHeapOnly(tup) \
+( \
+  (tup)->t_infomask2 & HEAP_ONLY_TUPLE \
+)
+
+#define HeapTupleHeaderSetHeapOnly(tup) \
+( \
+  (tup)->t_infomask2 |= HEAP_ONLY_TUPLE \
+)
+
+#define HeapTupleHeaderClearHeapOnly(tup) \
+( \
+  (tup)->t_infomask2 &= ~HEAP_ONLY_TUPLE \
+)
+
+#define HeapTupleHeaderHasMatch(tup) \
+( \
+  (tup)->t_infomask2 & HEAP_TUPLE_HAS_MATCH \
+)
+
+#define HeapTupleHeaderSetMatch(tup) \
+( \
+  (tup)->t_infomask2 |= HEAP_TUPLE_HAS_MATCH \
+)
+
+#define HeapTupleHeaderClearMatch(tup) \
+( \
+  (tup)->t_infomask2 &= ~HEAP_TUPLE_HAS_MATCH \
+)
+
+#define HeapTupleHeaderGetNatts(tup) \
+       ((tup)->t_infomask2 & HEAP_NATTS_MASK)
+
+#define HeapTupleHeaderSetNatts(tup, natts) \
+( \
+       (tup)->t_infomask2 = ((tup)->t_infomask2 & ~HEAP_NATTS_MASK) | (natts) \
+)
+
+
+/*
+ * BITMAPLEN(NATTS) -
+ *             Computes size of null bitmap given number of data columns.
+ */
+#define BITMAPLEN(NATTS)       (((int)(NATTS) + 7) / 8)
+
+/*
+ * MaxHeapTupleSize is the maximum allowed size of a heap tuple, including
+ * header and MAXALIGN alignment padding.  Basically it's BLCKSZ minus the
+ * other stuff that has to be on a disk page.  Since heap pages use no
+ * "special space", there's no deduction for that.
+ *
+ * NOTE: we allow for the ItemId that must point to the tuple, ensuring that
+ * an otherwise-empty page can indeed hold a tuple of this size.  Because
+ * ItemIds and tuples have different alignment requirements, don't assume that
+ * you can, say, fit 2 tuples of size MaxHeapTupleSize/2 on the same page.
+ */
+#define MaxHeapTupleSize  (BLCKSZ - MAXALIGN(SizeOfPageHeaderData + sizeof(ItemIdData)))
+
+/*
+ * MaxHeapTuplesPerPage is an upper bound on the number of tuples that can
+ * fit on one heap page.  (Note that indexes could have more, because they
+ * use a smaller tuple header.)  We arrive at the divisor because each tuple
+ * must be maxaligned, and it must have an associated item pointer.
+ *
+ * Note: with HOT, there could theoretically be more line pointers (not actual
+ * tuples) than this on a heap page.  However we constrain the number of line
+ * pointers to this anyway, to avoid excessive line-pointer bloat and not
+ * require increases in the size of work arrays.
+ */
+#define MaxHeapTuplesPerPage   \
+       ((int) ((BLCKSZ - SizeOfPageHeaderData) / \
+                       (MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)) + sizeof(ItemIdData))))
+
+/*
+ * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of
+ * data fields of char(n) and similar types.  It need not have anything
+ * directly to do with the *actual* upper limit of varlena values, which
+ * is currently 1Gb (see TOAST structures in postgres.h).  I've set it
+ * at 10Mb which seems like a reasonable number --- tgl 8/6/00.
+ */
+#define MaxAttrSize            (10 * 1024 * 1024)
+
+
+/*
+ * MinimalTuple is an alternative representation that is used for transient
+ * tuples inside the executor, in places where transaction status information
+ * is not required, the tuple rowtype is known, and shaving off a few bytes
+ * is worthwhile because we need to store many tuples. The representation
+ * is chosen so that tuple access routines can work with either full or
+ * minimal tuples via a HeapTupleData pointer structure.  The access routines
+ * see no difference, except that they must not access the transaction status
+ * or t_ctid fields because those aren't there.
+ *
+ * For the most part, MinimalTuples should be accessed via TupleTableSlot
+ * routines.  These routines will prevent access to the "system columns"
+ * and thereby prevent accidental use of the nonexistent fields.
+ *
+ * MinimalTupleData contains a length word, some padding, and fields matching
+ * HeapTupleHeaderData beginning with t_infomask2. The padding is chosen so
+ * that offsetof(t_infomask2) is the same modulo MAXIMUM_ALIGNOF in both
+ * structs.   This makes data alignment rules equivalent in both cases.
+ *
+ * When a minimal tuple is accessed via a HeapTupleData pointer, t_data is
+ * set to point MINIMAL_TUPLE_OFFSET bytes before the actual start of the
+ * minimal tuple --- that is, where a full tuple matching the minimal tuple's
+ * data would start.  This trick is what makes the structs seem equivalent.
+ *
+ * Note that t_hoff is computed the same as in a full tuple, hence it includes
+ * the MINIMAL_TUPLE_OFFSET distance.  t_len does not include that, however.
+ *
+ * MINIMAL_TUPLE_DATA_OFFSET is the offset to the first useful (non-pad) data
+ * other than the length word. tuplesort.c and tuplestore.c use this to avoid
+ * writing the padding to disk.
+ */
+#define MINIMAL_TUPLE_OFFSET \
+       ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) / MAXIMUM_ALIGNOF * MAXIMUM_ALIGNOF)
+#define MINIMAL_TUPLE_PADDING \
+       ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) % MAXIMUM_ALIGNOF)
+#define MINIMAL_TUPLE_DATA_OFFSET \
+       offsetof(MinimalTupleData, t_infomask2)
+
+struct MinimalTupleData
+{
+       uint32          t_len;                  /* actual length of minimal tuple */
+
+       char            mt_padding[MINIMAL_TUPLE_PADDING];
+
+       /* Fields below here must match HeapTupleHeaderData! */
+
+       uint16          t_infomask2;    /* number of attributes + various flags */
+
+       uint16          t_infomask;             /* various flag bits, see below */
+
+       uint8           t_hoff;                 /* sizeof header incl. bitmap, padding */
+
+       /* ^ - 23 bytes - ^ */
+
+       bits8           t_bits[1];              /* bitmap of NULLs -- VARIABLE LENGTH */
+
+       /* MORE DATA FOLLOWS AT END OF STRUCT */
+};
+/* typedef appears in htup.h */
+
+
+/*
+ * GETSTRUCT - given a HeapTuple pointer, return address of the user data
+ */
+#define GETSTRUCT(TUP) ((char *) ((TUP)->t_data) + (TUP)->t_data->t_hoff)
+
+/*
+ * Accessor macros to be used with HeapTuple pointers.
+ */
+
+#define HeapTupleHasNulls(tuple) \
+               (((tuple)->t_data->t_infomask & HEAP_HASNULL) != 0)
+
+#define HeapTupleNoNulls(tuple) \
+               (!((tuple)->t_data->t_infomask & HEAP_HASNULL))
+
+#define HeapTupleHasVarWidth(tuple) \
+               (((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH) != 0)
+
+#define HeapTupleAllFixed(tuple) \
+               (!((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH))
+
+#define HeapTupleHasExternal(tuple) \
+               (((tuple)->t_data->t_infomask & HEAP_HASEXTERNAL) != 0)
+
+#define HeapTupleIsHotUpdated(tuple) \
+               HeapTupleHeaderIsHotUpdated((tuple)->t_data)
+
+#define HeapTupleSetHotUpdated(tuple) \
+               HeapTupleHeaderSetHotUpdated((tuple)->t_data)
+
+#define HeapTupleClearHotUpdated(tuple) \
+               HeapTupleHeaderClearHotUpdated((tuple)->t_data)
+
+#define HeapTupleIsHeapOnly(tuple) \
+               HeapTupleHeaderIsHeapOnly((tuple)->t_data)
+
+#define HeapTupleSetHeapOnly(tuple) \
+               HeapTupleHeaderSetHeapOnly((tuple)->t_data)
+
+#define HeapTupleClearHeapOnly(tuple) \
+               HeapTupleHeaderClearHeapOnly((tuple)->t_data)
+
+#define HeapTupleGetOid(tuple) \
+               HeapTupleHeaderGetOid((tuple)->t_data)
+
+#define HeapTupleSetOid(tuple, oid) \
+               HeapTupleHeaderSetOid((tuple)->t_data, (oid))
+
+
+/* ----------------
+ *             fastgetattr
+ *
+ *             Fetch a user attribute's value as a Datum (might be either a
+ *             value, or a pointer into the data area of the tuple).
+ *
+ *             This must not be used when a system attribute might be requested.
+ *             Furthermore, the passed attnum MUST be valid.  Use heap_getattr()
+ *             instead, if in doubt.
+ *
+ *             This gets called many times, so we macro the cacheable and NULL
+ *             lookups, and call nocachegetattr() for the rest.
+ * ----------------
+ */
+
+#if !defined(DISABLE_COMPLEX_MACRO)
+
+#define fastgetattr(tup, attnum, tupleDesc, isnull)                                    \
+(                                                                                                                                      \
+       AssertMacro((attnum) > 0),                                                                              \
+       (*(isnull) = false),                                                                                    \
+       HeapTupleNoNulls(tup) ?                                                                                 \
+       (                                                                                                                               \
+               (tupleDesc)->attrs[(attnum)-1]->attcacheoff >= 0 ?                      \
+               (                                                                                                                       \
+                       fetchatt((tupleDesc)->attrs[(attnum)-1],                                \
+                               (char *) (tup)->t_data + (tup)->t_data->t_hoff +        \
+                                       (tupleDesc)->attrs[(attnum)-1]->attcacheoff)    \
+               )                                                                                                                       \
+               :                                                                                                                       \
+                       nocachegetattr((tup), (attnum), (tupleDesc))                    \
+       )                                                                                                                               \
+       :                                                                                                                               \
+       (                                                                                                                               \
+               att_isnull((attnum)-1, (tup)->t_data->t_bits) ?                         \
+               (                                                                                                                       \
+                       (*(isnull) = true),                                                                             \
+                       (Datum)NULL                                                                                             \
+               )                                                                                                                       \
+               :                                                                                                                       \
+               (                                                                                                                       \
+                       nocachegetattr((tup), (attnum), (tupleDesc))                    \
+               )                                                                                                                       \
+       )                                                                                                                               \
+)
+#else                                                  /* defined(DISABLE_COMPLEX_MACRO) */
+
+extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+                       bool *isnull);
+#endif   /* defined(DISABLE_COMPLEX_MACRO) */
+
+
+/* ----------------
+ *             heap_getattr
+ *
+ *             Extract an attribute of a heap tuple and return it as a Datum.
+ *             This works for either system or user attributes.  The given attnum
+ *             is properly range-checked.
+ *
+ *             If the field in question has a NULL value, we return a zero Datum
+ *             and set *isnull == true.  Otherwise, we set *isnull == false.
+ *
+ *             <tup> is the pointer to the heap tuple.  <attnum> is the attribute
+ *             number of the column (field) caller wants.      <tupleDesc> is a
+ *             pointer to the structure describing the row and all its fields.
+ * ----------------
+ */
+#define heap_getattr(tup, attnum, tupleDesc, isnull) \
+       ( \
+               ((attnum) > 0) ? \
+               ( \
+                       ((attnum) > (int) HeapTupleHeaderGetNatts((tup)->t_data)) ? \
+                       ( \
+                               (*(isnull) = true), \
+                               (Datum)NULL \
+                       ) \
+                       : \
+                               fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
+               ) \
+               : \
+                       heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \
+       )
+
+
+/* prototypes for functions in common/heaptuple.c */
+extern Size heap_compute_data_size(TupleDesc tupleDesc,
+                                          Datum *values, bool *isnull);
+extern void heap_fill_tuple(TupleDesc tupleDesc,
+                               Datum *values, bool *isnull,
+                               char *data, Size data_size,
+                               uint16 *infomask, bits8 *bit);
+extern bool heap_attisnull(HeapTuple tup, int attnum);
+extern Datum nocachegetattr(HeapTuple tup, int attnum,
+                          TupleDesc att);
+extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+                               bool *isnull);
+extern HeapTuple heap_copytuple(HeapTuple tuple);
+extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
+extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
+                               Datum *values, bool *isnull);
+extern HeapTuple heap_modify_tuple(HeapTuple tuple,
+                                 TupleDesc tupleDesc,
+                                 Datum *replValues,
+                                 bool *replIsnull,
+                                 bool *doReplace);
+extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
+                                 Datum *values, bool *isnull);
+
+/* these three are deprecated versions of the three above: */
+extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
+                          Datum *values, char *nulls);
+extern HeapTuple heap_modifytuple(HeapTuple tuple,
+                                TupleDesc tupleDesc,
+                                Datum *replValues,
+                                char *replNulls,
+                                char *replActions);
+extern void heap_deformtuple(HeapTuple tuple, TupleDesc tupleDesc,
+                                Datum *values, char *nulls);
+extern void heap_freetuple(HeapTuple htup);
+extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor,
+                                               Datum *values, bool *isnull);
+extern void heap_free_minimal_tuple(MinimalTuple mtup);
+extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
+extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
+extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup);
+
+#endif   /* HTUP_DETAILS_H */
index 42af4a9bbcf00c27821c5de12906e705ecfbb609..0572b252759fcf1ae033250580a0f7125688d896 100644 (file)
@@ -20,6 +20,7 @@
 #define RELOPTIONS_H
 
 #include "access/htup.h"
+#include "access/tupdesc.h"
 #include "nodes/pg_list.h"
 
 /* types supported by reloptions */
index 2e967e1d597ef44b1057412d665ae88cfce522fd..87acc8eb5bba9137f54ff46fe611aa39314f0843 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/htup_details.h"
 #include "access/itup.h"
 #include "access/tupdesc.h"
 
index 7511aa6405125e61ae8046fd2b4c1ecc5a583640..342dbb4d25f275b83267936f82095d8481f74511 100644 (file)
@@ -15,6 +15,7 @@
 #define TUPCONVERT_H
 
 #include "access/htup.h"
+#include "access/tupdesc.h"
 
 
 typedef struct TupleConversionMap
index e3dbde0def4910c108d91633e377edeec989108c..0f29acb244e9e05bf86fa184498d0723dca69525 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef TUPTOASTER_H
 #define TUPTOASTER_H
 
-#include "access/htup.h"
+#include "access/htup_details.h"
 #include "utils/relcache.h"
 
 /*
index 4db8c878c0c525be64972c51f5b16ce5719e7c1a..19c83fe75b61fb69ca054243db964880a59b9017 100644 (file)
@@ -15,6 +15,7 @@
 #define TUPTABLE_H
 
 #include "access/htup.h"
+#include "access/tupdesc.h"
 #include "storage/buf.h"
 
 /*----------
index c8815e52ebf1191c8928bccc23441031380b9012..c5549a62126fa05a86f97ffa41b64dd51369b945 100644 (file)
@@ -15,6 +15,7 @@
 #define INVAL_H
 
 #include "access/htup.h"
+#include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
 
index 4bf1029e109f5356e1a1d5261c8f1953076ab1fb..e88aa1ac06e63c47e6abe88c284bf9586eaba7ab 100644 (file)
@@ -13,7 +13,9 @@
 #ifndef LSYSCACHE_H
 #define LSYSCACHE_H
 
+#include "access/attnum.h"
 #include "access/htup.h"
+#include "nodes/pg_list.h"
 
 /* Result list element for get_op_btree_interpretation */
 typedef struct OpBtreeInterpretation
index 4415efafec08c867d202f7a738ba681797151bd5..cf83cc637271b25a997e2e5b5ebb10c25fd9d179 100644 (file)
@@ -16,6 +16,7 @@
 #include <locale.h>
 
 /* postgreSQL stuff */
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_language.h"
 #include "catalog/pg_proc.h"
index 0dc0e0b37edfdc01bb118ba5437361490606f1c6..35f57213719ccbbc78d1d56873e5e02218bb3109 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_proc_fn.h"
index 8b649a4e5dc370db53d851d941b44683dae5c968..3b5b3bbae2d6046638b3d7453a769a3cbc0c9bde 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <ctype.h>
 
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "access/tupconvert.h"
 #include "catalog/pg_proc.h"
index 63c3abd9b0bb6d613a3852882c1f23ea4b0b84d1..fa74e7d7a527fa9538fe3d4a18a8ec866f804522 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "plpgsql.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
index 96ee26c35c7327d95a9f434dbf4eb55071db2070..b2425edd6b496cc101ffbbc1402f709fadc80d3e 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "commands/trigger.h"
index 494ec37ea7cfada29752f2f75b9225880b9aae15..8b61f1a972f1c7962edcc9d382dfb70a60c2db2d 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
 #include "commands/trigger.h"
index 7fb5f00e0f2108f48508ed103fb25bae8e134f31..a28cb9a41f32a705ec490a8a7b01c838f3f16ecc 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "funcapi.h"
 #include "catalog/pg_proc.h"
index 00156e6658ec4509b0660eef03be3566d3d9a625..a65af37e657ca5ac9935bc3b70e314617209f5be 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "executor/spi_priv.h"
index 2cc7bbbd4deb343dec49f8e563ca50f9afed5493..2402c151a4f885c1389d0480c3c2e2c0b6fa97cd 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "postgres.h"
 
+#include "access/htup_details.h"
 #include "access/transam.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
index d2dfa66e0b2fea60274b3ca8323b976c826c867d..82e472a312779444415405dabdf9ea67b5c8c297 100644 (file)
@@ -6,6 +6,7 @@
 #define PLPY_TYPEIO_H
 
 #include "access/htup.h"
+#include "access/tupdesc.h"
 #include "fmgr.h"
 #include "storage/itemptr.h"
 
index ecde90626bf858a346f318b2954e643a74f46847..d329e9def813b18ac8f9262e4203354892db143d 100644 (file)
@@ -18,6 +18,7 @@
 #define CONST84
 #endif
 
+#include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"