Index: doc/src/sgml/catalogs.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/catalogs.sgml,v
retrieving revision 2.54
diff -c -r2.54 catalogs.sgml
*** doc/src/sgml/catalogs.sgml	2002/08/24 15:00:45	2.54
--- doc/src/sgml/catalogs.sgml	2002/08/28 07:24:30
***************
*** 821,826 ****
--- 821,836 ----
        </entry>
       </row>
  
+ 	 <row>
+ 	  <entry>attisinherited</entry>
+ 	  <entry><type>bool</type></entry>
+ 	  <entry></entry>
+ 	  <entry>
+ 	   This column is inherited from some other relation.  An inherited
+ 	   column cannot be dropped nor renamed.
+ 	  </entry>
+ 	 </row>
+ 
      </tbody>
     </tgroup>
    </table>
Index: src/backend/access/common/tupdesc.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/access/common/tupdesc.c,v
retrieving revision 1.85
diff -c -r1.85 tupdesc.c
*** src/backend/access/common/tupdesc.c	2002/08/05 02:30:49	1.85
--- src/backend/access/common/tupdesc.c	2002/08/28 07:24:31
***************
*** 341,347 ****
  				   Oid oidtypeid,
  				   int32 typmod,
  				   int attdim,
! 				   bool attisset)
  {
  	HeapTuple	tuple;
  	Form_pg_type typeForm;
--- 341,348 ----
  				   Oid oidtypeid,
  				   int32 typmod,
  				   int attdim,
! 				   bool attisset,
! 				   bool attisinherited)
  {
  	HeapTuple	tuple;
  	Form_pg_type typeForm;
***************
*** 389,394 ****
--- 390,396 ----
  	att->attnotnull = false;
  	att->atthasdef = false;
  	att->attisdropped = false;
+ 	att->attisinherited = attisinherited;
  
  	tuple = SearchSysCache(TYPEOID,
  						   ObjectIdGetDatum(oidtypeid),
***************
*** 484,489 ****
--- 486,492 ----
  	int			attdim;
  	int			ndef = 0;
  	bool		attisset;
+ 	bool		attisinherited;
  
  	/*
  	 * allocate a new tuple descriptor
***************
*** 509,518 ****
  		attisset = entry->typename->setof;
  		atttypmod = entry->typename->typmod;
  		attdim = length(entry->typename->arrayBounds);
  
  		TupleDescInitEntry(desc, attnum, attname,
  						   typenameTypeId(entry->typename),
! 						   atttypmod, attdim, attisset);
  
  		/* This is for constraints */
  		if (entry->is_not_null)
--- 512,522 ----
  		attisset = entry->typename->setof;
  		atttypmod = entry->typename->typmod;
  		attdim = length(entry->typename->arrayBounds);
+ 		attisinherited = entry->is_inherited;
  
  		TupleDescInitEntry(desc, attnum, attname,
  						   typenameTypeId(entry->typename),
! 						   atttypmod, attdim, attisset, attisinherited);
  
  		/* This is for constraints */
  		if (entry->is_not_null)
***************
*** 668,673 ****
--- 672,678 ----
  						   typeoid,
  						   -1,
  						   0,
+ 						   false,
  						   false);
  	}
  	else if (functyptype == 'p' && typeoid == RECORDOID)
Index: src/backend/commands/explain.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/explain.c,v
retrieving revision 1.84
diff -c -r1.84 explain.c
*** src/backend/commands/explain.c	2002/07/20 15:12:55	1.84
--- src/backend/commands/explain.c	2002/08/28 07:24:33
***************
*** 71,77 ****
  	/* need a tuple descriptor representing a single TEXT column */
  	tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, "QUERY PLAN",
! 					   TEXTOID, -1, 0, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
--- 71,77 ----
  	/* need a tuple descriptor representing a single TEXT column */
  	tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, "QUERY PLAN",
! 					   TEXTOID, -1, 0, false, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
Index: src/backend/commands/tablecmds.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/tablecmds.c,v
retrieving revision 1.34
diff -c -r1.34 tablecmds.c
*** src/backend/commands/tablecmds.c	2002/08/27 03:56:34	1.34
--- src/backend/commands/tablecmds.c	2002/08/28 07:24:39
***************
*** 36,41 ****
--- 36,42 ----
  #include "nodes/makefuncs.h"
  #include "optimizer/clauses.h"
  #include "optimizer/planmain.h"
+ #include "optimizer/plancat.h"
  #include "optimizer/prep.h"
  #include "parser/gramparse.h"
  #include "parser/parse_coerce.h"
***************
*** 615,620 ****
--- 616,622 ----
  				typename->typmod = attribute->atttypmod;
  				def->typename = typename;
  				def->is_not_null = attribute->attnotnull;
+ 				def->is_inherited = true;
  				def->raw_default = NULL;
  				def->cooked_default = NULL;
  				def->constraints = NIL;
***************
*** 1052,1058 ****
  renameatt(Oid relid,
  		  const char *oldattname,
  		  const char *newattname,
! 		  bool recurse)
  {
  	Relation	targetrelation;
  	Relation	attrelation;
--- 1054,1061 ----
  renameatt(Oid relid,
  		  const char *oldattname,
  		  const char *newattname,
! 		  bool recurse,
! 		  bool recursing)
  {
  	Relation	targetrelation;
  	Relation	attrelation;
***************
*** 1109,1115 ****
  			if (childrelid == relid)
  				continue;
  			/* note we need not recurse again! */
! 			renameatt(childrelid, oldattname, newattname, false);
  		}
  	}
  
--- 1112,1118 ----
  			if (childrelid == relid)
  				continue;
  			/* note we need not recurse again! */
! 			renameatt(childrelid, oldattname, newattname, false, true);
  		}
  	}
  
***************
*** 1124,1129 ****
--- 1127,1143 ----
  		elog(ERROR, "renameatt: system attribute \"%s\" may not be renamed",
  			 oldattname);
  
+ 	/*
+ 	 * if the attribute is inherited, forbid the renaming, unless we
+ 	 * are not in the first recursion step.  Non-recursive renaming of
+ 	 * inherited attribute is prohibited in tcop/utility.c, so we don't
+ 	 * need to check again.
+ 	 */
+ 	if (((Form_pg_attribute) GETSTRUCT(atttup))->attisinherited == true &&
+ 				!recursing)
+ 		elog(ERROR, "ALTER TABLE: renaming of inherited attribute "
+ 				"\"%s\" forbidden", oldattname);
+ 
  	/* should not already exist */
  	/* this test is deliberately not attisdropped-aware */
  	if (SearchSysCacheExists(ATTNAME,
***************
*** 1614,1619 ****
--- 1628,1636 ----
  	{
  		List	   *child,
  				   *children;
+ 		ColumnDef  *colDefChild = copyObject(colDef);
+ 
+ 		colDefChild->is_inherited = true;
  
  		/* this routine is actually in the planner */
  		children = find_all_inheritors(myrelid);
***************
*** 1630,1637 ****
  			if (childrelid == myrelid)
  				continue;
  
! 			AlterTableAddColumn(childrelid, false, colDef);
  		}
  	}
  
  	/*
--- 1647,1656 ----
  			if (childrelid == myrelid)
  				continue;
  
! 			AlterTableAddColumn(childrelid, false, colDefChild);
  		}
+ 
+ 		pfree(colDefChild);
  	}
  
  	/*
***************
*** 1716,1721 ****
--- 1735,1741 ----
  	attribute->atthasdef = (colDef->raw_default != NULL ||
  							colDef->cooked_default != NULL);
  	attribute->attisdropped = false;
+ 	attribute->attisinherited = colDef->is_inherited;
  
  	ReleaseSysCache(typeTuple);
  
***************
*** 2285,2291 ****
   */
  void
  AlterTableDropColumn(Oid myrelid,
! 					 bool inh, const char *colName,
  					 DropBehavior behavior)
  {
  	Relation	rel;
--- 2305,2311 ----
   */
  void
  AlterTableDropColumn(Oid myrelid,
! 					 bool inh, bool recursing, const char *colName,
  					 DropBehavior behavior)
  {
  	Relation	rel;
***************
*** 2344,2349 ****
--- 2364,2413 ----
  		elog(ERROR, "ALTER TABLE: Cannot drop last column from table \"%s\"",
  			RelationGetRelationName(rel));
  
+ 	/* Don't drop inherited column. */
+ 	if (tupleDesc->attrs[attnum - 1]->attisinherited == true &&
+ 			recursing == false)
+ 	{
+ 		elog(ERROR, "ALTER TABLE: Cannot drop inherited column \"%s\" from table \"%s\"",
+ 				colName, RelationGetRelationName(rel));
+ 	}
+ 
+ 	/* If we are asked to drop ONLY in this table (no recursion),
+ 	 * we need to mark the inheritors' attribute as non-inherited.
+ 	 */
+ 	if (inh == false && recursing == false)
+ 	{
+ 		Relation	attr_rel;
+ 		HeapTuple	tuple;
+ 		List	   *child,
+ 				   *children;
+ 
+ 		/* We only need direct inheritors */
+ 		children = find_inheritance_children(myrelid);
+ 		attr_rel = heap_openr(AttributeRelationName, RowExclusiveLock);
+ 		foreach (child, children)
+ 		{
+ 			/*
+ 			 * Okay, actually perform the catalog change
+ 			 */
+ 			Oid		childrelid = lfirsti(child);
+ 
+ 			tuple = SearchSysCacheCopyAttName(childrelid, colName);
+ 			if (!HeapTupleIsValid(tuple)) /* shouldn't happen */
+ 				elog(ERROR, "ALTER TABLE: relation %u has no column \"%s\"",
+ 						childrelid, colName);
+ 
+ 			((Form_pg_attribute) GETSTRUCT(tuple))->attisinherited = false;
+ 
+ 			simple_heap_update(attr_rel, &tuple->t_self, tuple);
+ 
+ 			/* keep the system catalog indexes current */
+ 			CatalogUpdateIndexes(attr_rel, tuple);
+ 		}
+ 		heap_close(attr_rel, RowExclusiveLock);
+ 	}
+ 
+ 
  	/*
  	 * Propagate to children if desired
  	 */
***************
*** 2367,2373 ****
  			if (childrelid == myrelid)
  				continue;
  			AlterTableDropColumn(childrelid,
! 								false, colName, behavior);
  		}
  	}
  
--- 2431,2437 ----
  			if (childrelid == myrelid)
  				continue;
  			AlterTableDropColumn(childrelid,
! 								false, true, colName, behavior);
  		}
  	}
  
***************
*** 3378,3392 ****
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1,
  					   "chunk_id",
  					   OIDOID,
! 					   -1, 0, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 2,
  					   "chunk_seq",
  					   INT4OID,
! 					   -1, 0, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 3,
  					   "chunk_data",
  					   BYTEAOID,
! 					   -1, 0, false);
  
  	/*
  	 * Ensure that the toast table doesn't itself get toasted, or we'll be
--- 3442,3456 ----
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1,
  					   "chunk_id",
  					   OIDOID,
! 					   -1, 0, false, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 2,
  					   "chunk_seq",
  					   INT4OID,
! 					   -1, 0, false, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 3,
  					   "chunk_data",
  					   BYTEAOID,
! 					   -1, 0, false, false);
  
  	/*
  	 * Ensure that the toast table doesn't itself get toasted, or we'll be
Index: src/backend/executor/execTuples.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/executor/execTuples.c,v
retrieving revision 1.56
diff -c -r1.56 execTuples.c
*** src/backend/executor/execTuples.c	2002/07/20 05:49:27	1.56
--- src/backend/executor/execTuples.c	2002/08/28 07:24:41
***************
*** 597,602 ****
--- 597,603 ----
  							   restype,
  							   resdom->restypmod,
  							   0,
+ 							   false,
  							   false);
  
  #ifdef NOT_USED
***************
*** 632,637 ****
--- 633,639 ----
  							   restype,
  							   fjRes->restypmod,
  							   0,
+ 							   false,
  							   false);
  #ifdef NOT_USED
  			ExecSetTypeInfo(fjRes->resno - 1,
***************
*** 656,661 ****
--- 658,664 ----
  								   restype,
  								   fjRes->restypmod,
  								   0,
+ 								   false,
  								   false);
  
  #ifdef NOT_USED
Index: src/backend/executor/nodeFunctionscan.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/executor/nodeFunctionscan.c,v
retrieving revision 1.5
diff -c -r1.5 nodeFunctionscan.c
*** src/backend/executor/nodeFunctionscan.c	2002/08/05 02:30:50	1.5
--- src/backend/executor/nodeFunctionscan.c	2002/08/28 07:24:41
***************
*** 241,246 ****
--- 241,247 ----
  						   funcrettype,
  						   -1,
  						   0,
+ 						   false,
  						   false);
  		scanstate->returnsTuple = false;
  	}
Index: src/backend/tcop/utility.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/tcop/utility.c,v
retrieving revision 1.173
diff -c -r1.173 utility.c
*** src/backend/tcop/utility.c	2002/08/27 04:55:11	1.173
--- src/backend/tcop/utility.c	2002/08/28 07:24:46
***************
*** 41,46 ****
--- 41,47 ----
  #include "commands/view.h"
  #include "miscadmin.h"
  #include "nodes/makefuncs.h"
+ #include "optimizer/plancat.h"
  #include "parser/parse.h"
  #include "parser/parse_clause.h"
  #include "parser/parse_expr.h"
***************
*** 427,436 ****
  						break;
  					}
  					case RENAME_COLUMN:
  						renameatt(relid,
  								  stmt->oldname,	/* old att name */
  								  stmt->newname,	/* new att name */
! 								  interpretInhOption(stmt->relation->inhOpt));	/* recursive? */
  						break;
  					case RENAME_TRIGGER:
  						renametrig(relid,
--- 428,443 ----
  						break;
  					}
  					case RENAME_COLUMN:
+ 						if (interpretInhOption(stmt->relation->inhOpt) == false
+ 								&& find_inheritance_children(relid) != NIL)
+ 							elog(ERROR, "ALTER TABLE: Renaming of inherited "
+ 									"attribute \"%s\" forbidden",
+ 									stmt->oldname);
  						renameatt(relid,
  								  stmt->oldname,	/* old att name */
  								  stmt->newname,	/* new att name */
! 								  interpretInhOption(stmt->relation->inhOpt),	/* recursive? */
! 								  false);			/* recursing already? */
  						break;
  					case RENAME_TRIGGER:
  						renametrig(relid,
***************
*** 464,469 ****
--- 471,483 ----
  				switch (stmt->subtype)
  				{
  					case 'A':	/* ADD COLUMN */
+ 						/* If requested not to inherit and the relation
+ 						 * has inheritors, forbid the operation
+ 						 */
+ 						if (interpretInhOption(stmt->relation->inhOpt) == false
+ 								&& find_inheritance_children(relid) != NIL)
+ 							elog(ERROR, "ALTER TABLE: Cannot add an "
+ 									"attribute to only inherited table");
  						/*
  						 * Recursively add column to table and,
  						 * if requested, to descendants
***************
*** 505,517 ****
  												   &(stmt->subtype));
  						break;
  					case 'D':	/* DROP COLUMN */
! 						/*
! 						 * XXX We don't actually recurse yet, but what we should do would be:
  						 * Recursively drop column from table and,
  						 * if requested, from descendants
  						 */
  						AlterTableDropColumn(relid,
  											 interpretInhOption(stmt->relation->inhOpt),
  											 stmt->name,
  											 stmt->behavior);
  						break;
--- 519,531 ----
  												   &(stmt->subtype));
  						break;
  					case 'D':	/* DROP COLUMN */
! 						 /*
  						 * Recursively drop column from table and,
  						 * if requested, from descendants
  						 */
  						AlterTableDropColumn(relid,
  											 interpretInhOption(stmt->relation->inhOpt),
+ 											 false,
  											 stmt->name,
  											 stmt->behavior);
  						break;
Index: src/backend/utils/adt/lockfuncs.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/lockfuncs.c,v
retrieving revision 1.2
diff -c -r1.2 lockfuncs.c
*** src/backend/utils/adt/lockfuncs.c	2002/08/27 04:00:28	1.2
--- src/backend/utils/adt/lockfuncs.c	2002/08/28 07:24:46
***************
*** 35,49 ****
  		funccxt = SRF_FIRSTCALL_INIT();
  		tupdesc = CreateTemplateTupleDesc(5, WITHOUTOID);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relation",
! 						   OIDOID, -1, 0, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "database",
! 						   OIDOID, -1, 0, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 3, "backendpid",
! 						   INT4OID, -1, 0, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 4, "mode",
! 						   TEXTOID, -1, 0, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 5, "isgranted",
! 						   BOOLOID, -1, 0, false);
  
  		funccxt->slot = TupleDescGetSlot(tupdesc);
  		funccxt->attinmeta = TupleDescGetAttInMetadata(tupdesc);
--- 35,49 ----
  		funccxt = SRF_FIRSTCALL_INIT();
  		tupdesc = CreateTemplateTupleDesc(5, WITHOUTOID);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relation",
! 						   OIDOID, -1, 0, false, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "database",
! 						   OIDOID, -1, 0, false, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 3, "backendpid",
! 						   INT4OID, -1, 0, false, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 4, "mode",
! 						   TEXTOID, -1, 0, false, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 5, "isgranted",
! 						   BOOLOID, -1, 0, false, false);
  
  		funccxt->slot = TupleDescGetSlot(tupdesc);
  		funccxt->attinmeta = TupleDescGetAttInMetadata(tupdesc);
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.84
diff -c -r1.84 guc.c
*** src/backend/utils/misc/guc.c	2002/08/26 17:53:59	1.84
--- src/backend/utils/misc/guc.c	2002/08/28 07:24:50
***************
*** 2278,2284 ****
  	/* need a tuple descriptor representing a single TEXT column */
  	tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, (char *) varname,
! 					   TEXTOID, -1, 0, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
--- 2278,2284 ----
  	/* need a tuple descriptor representing a single TEXT column */
  	tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, (char *) varname,
! 					   TEXTOID, -1, 0, false, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
***************
*** 2304,2312 ****
  	/* need a tuple descriptor representing two TEXT columns */
  	tupdesc = CreateTemplateTupleDesc(2, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
! 					   TEXTOID, -1, 0, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
! 					   TEXTOID, -1, 0, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
--- 2304,2312 ----
  	/* need a tuple descriptor representing two TEXT columns */
  	tupdesc = CreateTemplateTupleDesc(2, WITHOUTOID);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
! 					   TEXTOID, -1, 0, false, false);
  	TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
! 					   TEXTOID, -1, 0, false, false);
  
  	/* prepare for projection of tuples */
  	tstate = begin_tup_output_tupdesc(dest, tupdesc);
***************
*** 2431,2439 ****
  		/* need a tuple descriptor representing two TEXT columns */
  		tupdesc = CreateTemplateTupleDesc(2, WITHOUTOID);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
! 						   TEXTOID, -1, 0, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
! 						   TEXTOID, -1, 0, false);
  
  		/* allocate a slot for a tuple with this tupdesc */
  		slot = TupleDescGetSlot(tupdesc);
--- 2431,2439 ----
  		/* need a tuple descriptor representing two TEXT columns */
  		tupdesc = CreateTemplateTupleDesc(2, WITHOUTOID);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
! 						   TEXTOID, -1, 0, false, false);
  		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
! 						   TEXTOID, -1, 0, false, false);
  
  		/* allocate a slot for a tuple with this tupdesc */
  		slot = TupleDescGetSlot(tupdesc);
Index: src/include/access/tupdesc.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/access/tupdesc.h,v
retrieving revision 1.37
diff -c -r1.37 tupdesc.h
*** src/include/access/tupdesc.h	2002/07/20 05:16:59	1.37
--- src/include/access/tupdesc.h	2002/08/28 07:24:52
***************
*** 94,100 ****
  				   Oid oidtypeid,
  				   int32 typmod,
  				   int attdim,
! 				   bool attisset);
  
  extern TupleDesc BuildDescForRelation(List *schema);
  
--- 94,101 ----
  				   Oid oidtypeid,
  				   int32 typmod,
  				   int attdim,
! 				   bool attisset,
! 				   bool attisinherited);
  
  extern TupleDesc BuildDescForRelation(List *schema);
  
Index: src/include/catalog/pg_attribute.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/catalog/pg_attribute.h,v
retrieving revision 1.97
diff -c -r1.97 pg_attribute.h
*** src/include/catalog/pg_attribute.h	2002/08/08 19:37:11	1.97
--- src/include/catalog/pg_attribute.h	2002/08/28 07:24:53
***************
*** 146,151 ****
--- 146,154 ----
  
  	/* Is dropped (ie, logically invisible) or not */
  	bool		attisdropped;
+ 
+ 	/* This attribute is inherited */
+ 	bool		attisinherited;
  } FormData_pg_attribute;
  
  /*
***************
*** 154,160 ****
   * because of alignment padding at the end of the struct.)
   */
  #define ATTRIBUTE_TUPLE_SIZE \
! 	(offsetof(FormData_pg_attribute,attisdropped) + sizeof(bool))
  
  /* ----------------
   *		Form_pg_attribute corresponds to a pointer to a tuple with
--- 157,163 ----
   * because of alignment padding at the end of the struct.)
   */
  #define ATTRIBUTE_TUPLE_SIZE \
! 	(offsetof(FormData_pg_attribute,attisinherited) + sizeof(bool))
  
  /* ----------------
   *		Form_pg_attribute corresponds to a pointer to a tuple with
***************
*** 168,174 ****
   * ----------------
   */
  
! #define Natts_pg_attribute				16
  #define Anum_pg_attribute_attrelid		1
  #define Anum_pg_attribute_attname		2
  #define Anum_pg_attribute_atttypid		3
--- 171,177 ----
   * ----------------
   */
  
! #define Natts_pg_attribute				17
  #define Anum_pg_attribute_attrelid		1
  #define Anum_pg_attribute_attname		2
  #define Anum_pg_attribute_atttypid		3
***************
*** 185,190 ****
--- 188,194 ----
  #define Anum_pg_attribute_attnotnull	14
  #define Anum_pg_attribute_atthasdef		15
  #define Anum_pg_attribute_attisdropped	16
+ #define Anum_pg_attribute_attisinherited	17
  
  
  
***************
*** 215,480 ****
   * ----------------
   */
  #define Schema_pg_type \
! { 1247, {"typname"},	   19, -1, NAMEDATALEN,	1, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1247, {"typnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typowner"},	   23, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typlen"},		   21, 0,	2,	4, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1247, {"typbyval"},	   16, 0,	1,	5, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typtype"},	   18, -1,	1,	6, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typisdefined"},  16, -1,	1,	7, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typdelim"},	   18, 0,	1,	8, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typrelid"},	   26, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typelem"},	   26, 0,	4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typinput"},	   24, 0,	4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typoutput"},	   24, 0,	4, 12, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typalign"},	   18, 0,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typstorage"},    18, 0,	1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typnotnull"},    16, 0,   1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1247, {"typbasetype"},   26, 0,	4, 16, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typtypmod"},     23, 0,	4, 17, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typndims"},      23, 0,	4, 18, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1247, {"typdefaultbin"}, 25, 0,  -1, 19, 0, -1, -1, false, 'x', false, 'i', false, false, false }, \
! { 1247, {"typdefault"},    25, 0,  -1, 20, 0, -1, -1, false, 'x', false, 'i', false, false, false }
! 
! 
! DATA(insert ( 1247 typname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1247 typnamespace		26 -1 4   2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typowner			23 0  4   3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typlen			21 0  2   4 0 -1 -1 t p f s t f f));
! DATA(insert ( 1247 typbyval			16 0  1   5 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typtype			18 -1 1   6 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typisdefined		16 -1 1   7 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typdelim			18 0  1   8 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typrelid			26 0  4   9 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typelem			26 0  4  10 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typinput			24 0  4  11 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typoutput		24 0  4  12 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typalign			18 0  1  13 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typstorage		18 0  1  14 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typnotnull		16 0  1  15 0 -1 -1 t p f c t f f));
! DATA(insert ( 1247 typbasetype		26 0  4  16 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typtypmod		23 0  4  17 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typndims			23 0  4  18 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 typdefaultbin	25 0 -1  19 0 -1 -1 f x f i f f f));
! DATA(insert ( 1247 typdefault		25 0 -1  20 0 -1 -1 f x f i f f f));
! DATA(insert ( 1247 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1247 oid				26 0  4  -2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1247 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_database
   * ----------------
   */
! DATA(insert ( 1262 datname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1262 datdba			23 0  4   2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 encoding			23 0  4   3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 datistemplate	16 0  1   4 0 -1 -1 t p f c t f f));
! DATA(insert ( 1262 datallowconn		16 0  1   5 0 -1 -1 t p f c t f f));
! DATA(insert ( 1262 datlastsysoid	26 0  4   6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 datvacuumxid		28 0  4   7 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 datfrozenxid		28 0  4   8 0 -1 -1 t p f i t f f));
  /* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
! DATA(insert ( 1262 datpath			25 0 -1   9 0 -1 -1 f p f i t f f));
! DATA(insert ( 1262 datconfig	  1009 0 -1  10 0 -1 -1 f x f i f f f));
! DATA(insert ( 1262 datacl		  1034 0 -1  11 0 -1 -1 f x f i f f f));
! DATA(insert ( 1262 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1262 oid				26 0  4  -2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1262 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_proc
   * ----------------
   */
  #define Schema_pg_proc \
! { 1255, {"proname"},			19, -1, NAMEDATALEN,  1, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1255, {"pronamespace"},		26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1255, {"proowner"},			23, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1255, {"prolang"},			26, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1255, {"proisagg"},			16, -1,	1,	5, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1255, {"prosecdef"},			16, 0,	1,	6, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1255, {"proisstrict"},		16, 0,	1,	7, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1255, {"proretset"},			16, 0,	1,  8, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1255, {"provolatile"},		18, 0,	1,  9, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1255, {"pronargs"},			21, 0,	2, 10, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1255, {"prorettype"},			26, 0,	4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1255, {"proargtypes"},		30, 0, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1255, {"prosrc"},				25, 0, -1, 13, 0, -1, -1, false, 'x', false, 'i', false, false, false }, \
! { 1255, {"probin"},				17, 0, -1, 14, 0, -1, -1, false, 'x', false, 'i', false, false, false }, \
! { 1255, {"proacl"},			  1034, 0, -1, 15, 0, -1, -1, false, 'x', false, 'i', false, false, false }
! 
! DATA(insert ( 1255 proname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1255 pronamespace		26 -1 4   2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 proowner			23 0  4   3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 prolang			26 0  4   4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 proisagg			16 -1 1   5 0 -1 -1 t p f c t f f));
! DATA(insert ( 1255 prosecdef		16 0  1   6 0 -1 -1 t p f c t f f));
! DATA(insert ( 1255 proisstrict		16 0  1   7 0 -1 -1 t p f c t f f));
! DATA(insert ( 1255 proretset		16 0  1   8 0 -1 -1 t p f c t f f));
! DATA(insert ( 1255 provolatile		18 0  1   9 0 -1 -1 t p f c t f f));
! DATA(insert ( 1255 pronargs			21 0  2  10 0 -1 -1 t p f s t f f));
! DATA(insert ( 1255 prorettype		26 0  4  11 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 proargtypes		30 0 INDEX_MAX_KEYS*4 12 0 -1 -1 f p f i t f f));
! DATA(insert ( 1255 prosrc			25 0 -1  13 0 -1 -1 f x f i f f f));
! DATA(insert ( 1255 probin			17 0 -1  14 0 -1 -1 f x f i f f f));
! DATA(insert ( 1255 proacl		  1034 0 -1  15 0 -1 -1 f x f i f f f));
! DATA(insert ( 1255 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1255 oid				26 0  4  -2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1255 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_shadow
   * ----------------
   */
! DATA(insert ( 1260 usename			19	-1 NAMEDATALEN	1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1260 usesysid			23	-1	4	2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1260 usecreatedb		16	0	1	3 0 -1 -1 t p f c t f f));
! DATA(insert ( 1260 usesuper			16	0	1	4 0 -1 -1 t p f c t f f));
! DATA(insert ( 1260 usecatupd		16	0	1	5 0 -1 -1 t p f c t f f));
! DATA(insert ( 1260 passwd			25	0  -1	6 0 -1 -1 f x f i f f f));
! DATA(insert ( 1260 valuntil			702 0	4	7 0 -1 -1 t p f i f f f));
! DATA(insert ( 1260 useconfig	  1009  0  -1   8 0 -1 -1 f x f i f f f));
! DATA(insert ( 1260 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
  /* no OIDs in pg_shadow */
! DATA(insert ( 1260 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1260 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1260 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1260 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1260 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_group
   * ----------------
   */
! DATA(insert ( 1261 groname			19 -1 NAMEDATALEN  1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1261 grosysid			23 -1  4   2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1261 grolist		  1007 0 -1   3 0 -1 -1 f x f i f f f));
! DATA(insert ( 1261 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
  /* no OIDs in pg_group */
! DATA(insert ( 1261 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1261 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1261 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1261 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1261 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_attribute
   * ----------------
   */
  #define Schema_pg_attribute \
! { 1249, {"attrelid"},	  26, -1,	4,	1, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"attname"},	  19, -1, NAMEDATALEN,	2, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1249, {"atttypid"},	  26, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"attstattarget"}, 23, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"attlen"},		  21, 0,	2,	5, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1249, {"attnum"},		  21, 0,	2,	6, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1249, {"attndims"},	  23, 0,	4,	7, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"attcacheoff"},  23, 0,	4,	8, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"atttypmod"},	  23, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1249, {"attbyval"},	  16, 0,	1, 10, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"attstorage"},   18, 0,	1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"attisset"},	  16, 0,	1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"attalign"},	  18, 0,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"attnotnull"},	  16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"atthasdef"},	  16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1249, {"attisdropped"}, 16, 0, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false }
! 
! DATA(insert ( 1249 attrelid			26 -1  4   1 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 attname			19 -1 NAMEDATALEN  2 0 -1 -1 f p f i t f f));
! DATA(insert ( 1249 atttypid			26 0  4   3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 attstattarget	23 0  4   4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 attlen			21 0  2   5 0 -1 -1 t p f s t f f));
! DATA(insert ( 1249 attnum			21 0  2   6 0 -1 -1 t p f s t f f));
! DATA(insert ( 1249 attndims			23 0  4   7 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 attcacheoff		23 0  4   8 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 atttypmod		23 0  4   9 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 attbyval			16 0  1  10 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 attstorage		18 0  1  11 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 attisset			16 0  1  12 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 attalign			18 0  1  13 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 attnotnull		16 0  1  14 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 atthasdef		16 0  1  15 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 attisdropped		16 0  1  16 0 -1 -1 t p f c t f f));
! DATA(insert ( 1249 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
  /* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1249 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_class
   * ----------------
   */
  #define Schema_pg_class \
! { 1259, {"relname"},	   19, -1, NAMEDATALEN,	1, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1259, {"relnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"reltype"},	   26, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"relowner"},	   23, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"relam"},		   26, 0,	4,	5, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"relfilenode"},   26, 0,	4,	6, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"relpages"},	   23, 0,	4,	7, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"reltuples"},	   700, 0,	4,	8, 0, -1, -1, false, 'p', false, 'i', true, false, false }, \
! { 1259, {"reltoastrelid"}, 26, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"reltoastidxid"}, 26, 0,	4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false }, \
! { 1259, {"relhasindex"},   16, 0,	1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relisshared"},   16, 0,	1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relkind"},	   18, -1,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relnatts"},	   21, 0,	2, 14, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"relchecks"},	   21, 0,	2, 15, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"reltriggers"},   21, 0,	2, 16, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"relukeys"},	   21, 0,	2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"relfkeys"},	   21, 0,	2, 18, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"relrefs"},	   21, 0,	2, 19, 0, -1, -1, true, 'p', false, 's', true, false, false }, \
! { 1259, {"relhasoids"},    16, 0,	1, 20, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relhaspkey"},    16, 0,	1, 21, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relhasrules"},   16, 0,	1, 22, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relhassubclass"},16, 0,	1, 23, 0, -1, -1, true, 'p', false, 'c', true, false, false }, \
! { 1259, {"relacl"},		 1034, 0,  -1, 24, 0, -1, -1, false, 'x', false, 'i', false, false, false }
! 
! DATA(insert ( 1259 relname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1259 relnamespace		26 -1 4   2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 reltype			26 0  4   3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 relowner			23 0  4   4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 relam			26 0  4   5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 relfilenode		26 0  4   6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 relpages			23 0  4   7 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 reltuples	   700 0  4   8 0 -1 -1 f p f i t f f));
! DATA(insert ( 1259 reltoastrelid	26 0  4   9 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 reltoastidxid	26 0  4  10 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 relhasindex		16 0  1  11 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relisshared		16 0  1  12 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relkind			18 -1 1  13 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relnatts			21 0  2  14 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 relchecks		21 0  2  15 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 reltriggers		21 0  2  16 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 relukeys			21 0  2  17 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 relfkeys			21 0  2  18 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 relrefs			21 0  2  19 0 -1 -1 t p f s t f f));
! DATA(insert ( 1259 relhasoids		16 0  1  20 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relhaspkey		16 0  1  21 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relhasrules		16 0  1  22 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relhassubclass	16 0  1  23 0 -1 -1 t p f c t f f));
! DATA(insert ( 1259 relacl		  1034 0 -1  24 0 -1 -1 f x f i f f f));
! DATA(insert ( 1259 ctid				27 0  6  -1 0 -1 -1 f p f i t f f));
! DATA(insert ( 1259 oid				26 0  4  -2 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 xmin				28 0  4  -3 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 cmin				29 0  4  -4 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 xmax				28 0  4  -5 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 cmax				29 0  4  -6 0 -1 -1 t p f i t f f));
! DATA(insert ( 1259 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f));
  
  /* ----------------
   *		pg_xactlock - this is not a real relation, but is a placeholder
--- 219,486 ----
   * ----------------
   */
  #define Schema_pg_type \
! { 1247, {"typname"},	   19, -1, NAMEDATALEN,	1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typowner"},	   23, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typlen"},		   21, 0,	2,	4, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1247, {"typbyval"},	   16, 0,	1,	5, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typtype"},	   18, -1,	1,	6, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typisdefined"},  16, -1,	1,	7, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typdelim"},	   18, 0,	1,	8, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typrelid"},	   26, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typelem"},	   26, 0,	4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typinput"},	   24, 0,	4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typoutput"},	   24, 0,	4, 12, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typalign"},	   18, 0,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typstorage"},    18, 0,	1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typnotnull"},    16, 0,   1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1247, {"typbasetype"},   26, 0,	4, 16, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typtypmod"},     23, 0,	4, 17, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typndims"},      23, 0,	4, 18, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1247, {"typdefaultbin"}, 25, 0,  -1, 19, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1247, {"typdefault"},    25, 0,  -1, 20, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
! 
! 
! DATA(insert ( 1247 typname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1247 typnamespace		26 -1 4   2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typowner			23 0  4   3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typlen			21 0  2   4 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1247 typbyval			16 0  1   5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typtype			18 -1 1   6 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typisdefined		16 -1 1   7 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typdelim			18 0  1   8 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typrelid			26 0  4   9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typelem			26 0  4  10 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typinput			24 0  4  11 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typoutput		24 0  4  12 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typalign			18 0  1  13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typstorage		18 0  1  14 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typnotnull		16 0  1  15 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1247 typbasetype		26 0  4  16 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typtypmod		23 0  4  17 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typndims			23 0  4  18 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 typdefaultbin	25 0 -1  19 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1247 typdefault		25 0 -1  20 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1247 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1247 oid				26 0  4  -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1247 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_database
   * ----------------
   */
! DATA(insert ( 1262 datname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 datdba			23 0  4   2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 encoding			23 0  4   3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datistemplate	16 0  1   4 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1262 datallowconn		16 0  1   5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1262 datlastsysoid	26 0  4   6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datvacuumxid		28 0  4   7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 datfrozenxid		28 0  4   8 0 -1 -1 t p f i t f f f));
  /* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
! DATA(insert ( 1262 datpath			25 0 -1   9 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 datconfig	  1009 0 -1  10 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1262 datacl		  1034 0 -1  11 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1262 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1262 oid				26 0  4  -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1262 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_proc
   * ----------------
   */
  #define Schema_pg_proc \
! { 1255, {"proname"},			19, -1, NAMEDATALEN,  1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"pronamespace"},		26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proowner"},			23, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"prolang"},			26, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proisagg"},			16, -1,	1,	5, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"prosecdef"},			16, 0,	1,	6, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"proisstrict"},		16, 0,	1,	7, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"proretset"},			16, 0,	1,  8, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"provolatile"},		18, 0,	1,  9, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1255, {"pronargs"},			21, 0,	2, 10, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1255, {"prorettype"},			26, 0,	4, 11, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"proargtypes"},		30, 0, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1255, {"prosrc"},				25, 0, -1, 13, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1255, {"probin"},				17, 0, -1, 14, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }, \
! { 1255, {"proacl"},			  1034, 0, -1, 15, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
! 
! DATA(insert ( 1255 proname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 pronamespace		26 -1 4   2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proowner			23 0  4   3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 prolang			26 0  4   4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proisagg			16 -1 1   5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 prosecdef		16 0  1   6 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 proisstrict		16 0  1   7 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 proretset		16 0  1   8 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 provolatile		18 0  1   9 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1255 pronargs			21 0  2  10 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1255 prorettype		26 0  4  11 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 proargtypes		30 0 INDEX_MAX_KEYS*4 12 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 prosrc			25 0 -1  13 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 probin			17 0 -1  14 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 proacl		  1034 0 -1  15 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1255 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1255 oid				26 0  4  -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1255 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_shadow
   * ----------------
   */
! DATA(insert ( 1260 usename			19	-1 NAMEDATALEN	1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1260 usesysid			23	-1	4	2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 usecreatedb		16	0	1	3 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 usesuper			16	0	1	4 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 usecatupd		16	0	1	5 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1260 passwd			25	0  -1	6 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1260 valuntil			702 0	4	7 0 -1 -1 t p f i f f f f));
! DATA(insert ( 1260 useconfig	  1009  0  -1   8 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1260 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
  /* no OIDs in pg_shadow */
! DATA(insert ( 1260 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1260 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_group
   * ----------------
   */
! DATA(insert ( 1261 groname			19 -1 NAMEDATALEN  1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1261 grosysid			23 -1  4   2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 grolist		  1007 0 -1   3 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1261 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
  /* no OIDs in pg_group */
! DATA(insert ( 1261 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1261 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_attribute
   * ----------------
   */
  #define Schema_pg_attribute \
! { 1249, {"attrelid"},	  26, -1,	4,	1, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attname"},	  19, -1, NAMEDATALEN,	2, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"atttypid"},	  26, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attstattarget"}, 23, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attlen"},		  21, 0,	2,	5, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1249, {"attnum"},		  21, 0,	2,	6, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1249, {"attndims"},	  23, 0,	4,	7, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attcacheoff"},  23, 0,	4,	8, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"atttypmod"},	  23, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1249, {"attbyval"},	  16, 0,	1, 10, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attstorage"},   18, 0,	1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisset"},	  16, 0,	1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attalign"},	  18, 0,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attnotnull"},	  16, 0, 1, 14, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"atthasdef"},	  16, 0, 1, 15, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisdropped"}, 16, 0, 1, 16, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1249, {"attisinherited"}, 16, 0, 1, 17, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }
! 
! DATA(insert ( 1249 attrelid			26 -1  4   1 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attname			19 -1 NAMEDATALEN  2 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1249 atttypid			26 0  4   3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attstattarget	23 0  4   4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attlen			21 0  2   5 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1249 attnum			21 0  2   6 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1249 attndims			23 0  4   7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attcacheoff		23 0  4   8 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 atttypmod		23 0  4   9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 attbyval			16 0  1  10 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attstorage		18 0  1  11 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attisset			16 0  1  12 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attalign			18 0  1  13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attnotnull		16 0  1  14 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 atthasdef		16 0  1  15 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 attisdropped		16 0  1  16 0 -1 -1 t p f c t f f f));
! DATA(insert	( 1249 attisinherited	16 0  1  17 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1249 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
  /* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1249 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_class
   * ----------------
   */
  #define Schema_pg_class \
! { 1259, {"relname"},	   19, -1, NAMEDATALEN,	1, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltype"},	   26, 0,	4,	3, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relowner"},	   23, 0,	4,	4, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relam"},		   26, 0,	4,	5, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relfilenode"},   26, 0,	4,	6, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relpages"},	   23, 0,	4,	7, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltuples"},	   700, 0,	4,	8, 0, -1, -1, false, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltoastrelid"}, 26, 0,	4,	9, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"reltoastidxid"}, 26, 0,	4, 10, 0, -1, -1, true, 'p', false, 'i', true, false, false, false }, \
! { 1259, {"relhasindex"},   16, 0,	1, 11, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relisshared"},   16, 0,	1, 12, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relkind"},	   18, -1,	1, 13, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relnatts"},	   21, 0,	2, 14, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relchecks"},	   21, 0,	2, 15, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"reltriggers"},   21, 0,	2, 16, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relukeys"},	   21, 0,	2, 17, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relfkeys"},	   21, 0,	2, 18, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relrefs"},	   21, 0,	2, 19, 0, -1, -1, true, 'p', false, 's', true, false, false, false }, \
! { 1259, {"relhasoids"},    16, 0,	1, 20, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhaspkey"},    16, 0,	1, 21, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhasrules"},   16, 0,	1, 22, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relhassubclass"},16, 0,	1, 23, 0, -1, -1, true, 'p', false, 'c', true, false, false, false }, \
! { 1259, {"relacl"},		 1034, 0,  -1, 24, 0, -1, -1, false, 'x', false, 'i', false, false, false, false }
! 
! DATA(insert ( 1259 relname			19 -1 NAMEDATALEN   1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 relnamespace		26 -1 4   2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltype			26 0  4   3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relowner			23 0  4   4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relam			26 0  4   5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relfilenode		26 0  4   6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relpages			23 0  4   7 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltuples	   700 0  4   8 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 reltoastrelid	26 0  4   9 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 reltoastidxid	26 0  4  10 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 relhasindex		16 0  1  11 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relisshared		16 0  1  12 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relkind			18 -1 1  13 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relnatts			21 0  2  14 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relchecks		21 0  2  15 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 reltriggers		21 0  2  16 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relukeys			21 0  2  17 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relfkeys			21 0  2  18 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relrefs			21 0  2  19 0 -1 -1 t p f s t f f f));
! DATA(insert ( 1259 relhasoids		16 0  1  20 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhaspkey		16 0  1  21 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhasrules		16 0  1  22 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relhassubclass	16 0  1  23 0 -1 -1 t p f c t f f f));
! DATA(insert ( 1259 relacl		  1034 0 -1  24 0 -1 -1 f x f i f f f f));
! DATA(insert ( 1259 ctid				27 0  6  -1 0 -1 -1 f p f i t f f f));
! DATA(insert ( 1259 oid				26 0  4  -2 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 xmin				28 0  4  -3 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 cmin				29 0  4  -4 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 xmax				28 0  4  -5 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 cmax				29 0  4  -6 0 -1 -1 t p f i t f f f));
! DATA(insert ( 1259 tableoid			26 0  4  -7 0 -1 -1 t p f i t f f f));
  
  /* ----------------
   *		pg_xactlock - this is not a real relation, but is a placeholder
***************
*** 484,489 ****
   *				  table; and this entry is just to link to that one.
   * ----------------
   */
! DATA(insert ( 376 xactlockfoo		26 0  4   1 0 -1 -1 t p f i t f f));
  
  #endif   /* PG_ATTRIBUTE_H */
--- 490,495 ----
   *				  table; and this entry is just to link to that one.
   * ----------------
   */
! DATA(insert ( 376 xactlockfoo		26 0  4   1 0 -1 -1 t p f i t f f f));
  
  #endif   /* PG_ATTRIBUTE_H */
Index: src/include/catalog/pg_class.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/catalog/pg_class.h,v
retrieving revision 1.71
diff -c -r1.71 pg_class.h
*** src/include/catalog/pg_class.h	2002/08/15 16:36:07	1.71
--- src/include/catalog/pg_class.h	2002/08/28 07:24:54
***************
*** 136,142 ****
  
  DATA(insert OID = 1247 (  pg_type		PGNSP 71 PGUID 0 1247 0 0 0 0 f f r 20 0 0 0 0 0 t f f f _null_ ));
  DESCR("");
! DATA(insert OID = 1249 (  pg_attribute	PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 16 0 0 0 0 0 f f f f _null_ ));
  DESCR("");
  DATA(insert OID = 1255 (  pg_proc		PGNSP 81 PGUID 0 1255 0 0 0 0 f f r 15 0 0 0 0 0 t f f f _null_ ));
  DESCR("");
--- 136,142 ----
  
  DATA(insert OID = 1247 (  pg_type		PGNSP 71 PGUID 0 1247 0 0 0 0 f f r 20 0 0 0 0 0 t f f f _null_ ));
  DESCR("");
! DATA(insert OID = 1249 (  pg_attribute	PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 17 0 0 0 0 0 f f f f _null_ ));
  DESCR("");
  DATA(insert OID = 1255 (  pg_proc		PGNSP 81 PGUID 0 1255 0 0 0 0 f f r 15 0 0 0 0 0 t f f f _null_ ));
  DESCR("");
Index: src/include/commands/tablecmds.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/commands/tablecmds.h,v
retrieving revision 1.5
diff -c -r1.5 tablecmds.h
*** src/include/commands/tablecmds.h	2002/07/01 15:27:56	1.5
--- src/include/commands/tablecmds.h	2002/08/28 07:24:54
***************
*** 33,39 ****
  									   const char *colName,
  									   Node *flagValue, const char *flagType);
  
! extern void AlterTableDropColumn(Oid myrelid, bool inh,
  					 			 const char *colName,
  								 DropBehavior behavior);
  
--- 33,39 ----
  									   const char *colName,
  									   Node *flagValue, const char *flagType);
  
! extern void AlterTableDropColumn(Oid myrelid, bool inh, bool recursing,
  					 			 const char *colName,
  								 DropBehavior behavior);
  
***************
*** 57,63 ****
  extern void renameatt(Oid relid,
  		  const char *oldattname,
  		  const char *newattname,
! 		  bool recurse);
  
  extern void renamerel(Oid relid,
  		  const char *newrelname);
--- 57,64 ----
  extern void renameatt(Oid relid,
  		  const char *oldattname,
  		  const char *newattname,
! 		  bool recurse,
! 		  bool recursing);
  
  extern void renamerel(Oid relid,
  		  const char *newrelname);
Index: src/include/nodes/parsenodes.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/nodes/parsenodes.h,v
retrieving revision 1.202
diff -c -r1.202 parsenodes.h
*** src/include/nodes/parsenodes.h	2002/08/27 04:55:12	1.202
--- src/include/nodes/parsenodes.h	2002/08/28 07:24:57
***************
*** 280,285 ****
--- 280,286 ----
  	char	   *colname;		/* name of column */
  	TypeName   *typename;		/* type of column */
  	bool		is_not_null;	/* NOT NULL constraint specified? */
+ 	bool		is_inherited;	/* is inherited */
  	Node	   *raw_default;	/* default value (untransformed parse
  								 * tree) */
  	char	   *cooked_default; /* nodeToString representation */
Index: src/test/regress/expected/alter_table.out
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/test/regress/expected/alter_table.out,v
retrieving revision 1.48
diff -c -r1.48 alter_table.out
*** src/test/regress/expected/alter_table.out	2002/08/04 05:11:37	1.48
--- src/test/regress/expected/alter_table.out	2002/08/28 07:25:03
***************
*** 1023,1025 ****
--- 1023,1056 ----
  (3 rows)
  
  drop table test;
+ -- test inheritance
+ create table dropColumn (a int, b int, e int);
+ create table dropColumnChild (c int) inherits (dropColumn);
+ create table dropColumnAnother (d int) inherits (dropColumnChild);
+ -- these two should fail
+ alter table dropColumnchild drop column a;
+ ERROR:  ALTER TABLE: Cannot drop inherited column "a" from table "dropcolumnchild"
+ alter table only dropColumnChild drop column b;
+ ERROR:  ALTER TABLE: Cannot drop inherited column "b" from table "dropcolumnchild"
+ -- these three should work
+ alter table only dropColumn drop column e;
+ alter table dropColumnChild drop column c;
+ alter table dropColumn drop column a;
+ create table renameColumn (a int);
+ create table renameColumnChild (b int) inherits (renameColumn);
+ create table renameColumnAnother (c int) inherits (renameColumnChild);
+ -- these three should fail
+ alter table renameColumnChild rename column a to d;
+ ERROR:  ALTER TABLE: renaming of inherited attribute "a" forbidden
+ alter table only renameColumnChild rename column a to d;
+ ERROR:  ALTER TABLE: Renaming of inherited attribute "a" forbidden
+ alter table only renameColumn rename column a to d;
+ ERROR:  ALTER TABLE: Renaming of inherited attribute "a" forbidden
+ -- these should work
+ alter table renameColumn rename column a to d;
+ alter table renameColumnChild rename column b to a;
+ -- this should work
+ alter table renameColumn add column w int;
+ -- this should fail
+ alter table only renameColumn add column x int;
+ ERROR:  ALTER TABLE: Cannot add an attribute to only inherited table
Index: src/test/regress/sql/alter_table.sql
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/test/regress/sql/alter_table.sql,v
retrieving revision 1.31
diff -c -r1.31 alter_table.sql
*** src/test/regress/sql/alter_table.sql	2002/08/04 04:28:10	1.31
--- src/test/regress/sql/alter_table.sql	2002/08/28 07:25:07
***************
*** 731,733 ****
--- 731,766 ----
  select * from test;
  drop table test;
  
+ -- test inheritance
+ 
+ create table dropColumn (a int, b int, e int);
+ create table dropColumnChild (c int) inherits (dropColumn);
+ create table dropColumnAnother (d int) inherits (dropColumnChild);
+ 
+ -- these two should fail
+ alter table dropColumnchild drop column a;
+ alter table only dropColumnChild drop column b;
+ 
+ -- these three should work
+ alter table only dropColumn drop column e;
+ alter table dropColumnChild drop column c;
+ alter table dropColumn drop column a;
+ 
+ create table renameColumn (a int);
+ create table renameColumnChild (b int) inherits (renameColumn);
+ create table renameColumnAnother (c int) inherits (renameColumnChild);
+ 
+ -- these three should fail
+ alter table renameColumnChild rename column a to d;
+ alter table only renameColumnChild rename column a to d;
+ alter table only renameColumn rename column a to d;
+ 
+ -- these should work
+ alter table renameColumn rename column a to d;
+ alter table renameColumnChild rename column b to a;
+ 
+ -- this should work
+ alter table renameColumn add column w int;
+ 
+ -- this should fail
+ alter table only renameColumn add column x int;
