*** a/doc/src/sgml/ref/alter_table.sgml
--- b/doc/src/sgml/ref/alter_table.sgml
***************
*** 39,44 **** where <replaceable class="PARAMETER">action</replaceable> is one of:
--- 39,45 ----
      ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> DROP DEFAULT
      ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET | DROP } NOT NULL
      ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS <replaceable class="PARAMETER">integer</replaceable>
+     ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET DISTINCT<replaceable class="PARAMETER">floating point</replaceable>
      ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
      ADD <replaceable class="PARAMETER">table_constraint</replaceable>
      DROP CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> [ RESTRICT | CASCADE ]
***************
*** 154,159 **** where <replaceable class="PARAMETER">action</replaceable> is one of:
--- 155,186 ----
     </varlistentry>
  
     <varlistentry>
+     <term><literal>SET DISTINCT</literal></term>
+     <listitem>
+      <para>
+       This form can be used to override the result of the ndistinct computation
+       performed by subsequent
+       <xref linkend="sql-analyze" endterm="sql-analyze-title"> operations.
+       When set to a positive value, ANALYZE will assume that the column
+       contains exactly the specified number of distinct values (even if its
+       own analysis indicates otherwie).  When set to a negative value, which
+       must be greater than or equal to -1, it will assume that the
+       number of distinct values in the column is linear in the size of the
+       table, and will compute the exact value by multiplying the estimated
+       table size by the absolute value of the number specified.  This can
+       be useful when the size of the table changes over time; the
+       multiplication by the number of rows in the table is not performed until
+       query planning time.
+       Use a value of 0 to revert to computing the number of distinct values
+       normally.
+       For more information on the use of statistics by the
+       <productname>PostgreSQL</productname> query planner, refer to
+       <xref linkend="planner-stats">.
+      </para>
+     </listitem>
+    </varlistentry>
+ 
+    <varlistentry>
      <indexterm>
       <primary>TOAST</primary>
       <secondary>per-column storage settings</secondary>
*** a/doc/src/sgml/ref/analyze.sgml
--- b/doc/src/sgml/ref/analyze.sgml
***************
*** 160,165 **** ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
--- 160,175 ----
    </para>
  
    <para>
+    The analyzer also estimates the number of distinct values that appear
+    in each column.  Because only a subset of pages are scanned, this method
+    can sometimes be quite inaccurate, especially for large tables.  If this
+    inaccuracy leads to bad query plans, the analyzer can be forced to use
+    a more correct value with <command>ALTER TABLE ... ALTER COLUMN ... SET
+    STATISTICS</command> (see <xref linkend="sql-altertable"
+    endterm="sql-altertable-title">).
+   </para>
+ 
+   <para>
     The largest statistics target among the columns being analyzed determines
     the number of table rows sampled to prepare the statistics.  Increasing
     the target causes a proportional increase in the time and space needed
*** a/src/backend/access/common/tupdesc.c
--- b/src/backend/access/common/tupdesc.c
***************
*** 338,343 **** equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2)
--- 338,345 ----
  			return false;
  		if (attr1->attstattarget != attr2->attstattarget)
  			return false;
+ 		if (attr1->attdistinct != attr2->attdistinct)
+ 			return false;
  		if (attr1->attlen != attr2->attlen)
  			return false;
  		if (attr1->attndims != attr2->attndims)
***************
*** 465,470 **** TupleDescInitEntry(TupleDesc desc,
--- 467,473 ----
  		MemSet(NameStr(att->attname), 0, NAMEDATALEN);
  
  	att->attstattarget = -1;
+ 	att->attdistinct = 0;
  	att->attcacheoff = -1;
  	att->atttypmod = typmod;
  
*** a/src/backend/bootstrap/bootstrap.c
--- b/src/backend/bootstrap/bootstrap.c
***************
*** 743,748 **** DefineAttr(char *name, char *type, int attnum)
--- 743,749 ----
  	}
  
  	attrtypes[attnum]->attstattarget = -1;
+ 	attrtypes[attnum]->attdistinct = 0;
  	attrtypes[attnum]->attcacheoff = -1;
  	attrtypes[attnum]->atttypmod = -1;
  	attrtypes[attnum]->attislocal = true;
*** a/src/backend/catalog/heap.c
--- b/src/backend/catalog/heap.c
***************
*** 111,147 **** static List *insert_ordered_unique_oid(List *list, Oid datum);
   */
  
  static FormData_pg_attribute a1 = {
! 	0, {"ctid"}, TIDOID, 0, sizeof(ItemPointerData),
  	SelfItemPointerAttributeNumber, 0, -1, -1,
  	false, 'p', 's', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a2 = {
! 	0, {"oid"}, OIDOID, 0, sizeof(Oid),
  	ObjectIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a3 = {
! 	0, {"xmin"}, XIDOID, 0, sizeof(TransactionId),
  	MinTransactionIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a4 = {
! 	0, {"cmin"}, CIDOID, 0, sizeof(CommandId),
  	MinCommandIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a5 = {
! 	0, {"xmax"}, XIDOID, 0, sizeof(TransactionId),
  	MaxTransactionIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a6 = {
! 	0, {"cmax"}, CIDOID, 0, sizeof(CommandId),
  	MaxCommandIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
--- 111,147 ----
   */
  
  static FormData_pg_attribute a1 = {
! 	0, {"ctid"}, TIDOID, 0, 0, sizeof(ItemPointerData),
  	SelfItemPointerAttributeNumber, 0, -1, -1,
  	false, 'p', 's', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a2 = {
! 	0, {"oid"}, OIDOID, 0, 0, sizeof(Oid),
  	ObjectIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a3 = {
! 	0, {"xmin"}, XIDOID, 0, 0, sizeof(TransactionId),
  	MinTransactionIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a4 = {
! 	0, {"cmin"}, CIDOID, 0, 0, sizeof(CommandId),
  	MinCommandIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a5 = {
! 	0, {"xmax"}, XIDOID, 0, 0, sizeof(TransactionId),
  	MaxTransactionIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
  
  static FormData_pg_attribute a6 = {
! 	0, {"cmax"}, CIDOID, 0, 0, sizeof(CommandId),
  	MaxCommandIdAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
***************
*** 153,159 **** static FormData_pg_attribute a6 = {
   * used in SQL.
   */
  static FormData_pg_attribute a7 = {
! 	0, {"tableoid"}, OIDOID, 0, sizeof(Oid),
  	TableOidAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
--- 153,159 ----
   * used in SQL.
   */
  static FormData_pg_attribute a7 = {
! 	0, {"tableoid"}, OIDOID, 0, 0, sizeof(Oid),
  	TableOidAttributeNumber, 0, -1, -1,
  	true, 'p', 'i', true, false, false, true, 0, { 0 }
  };
***************
*** 514,519 **** InsertPgAttributeTuple(Relation pg_attribute_rel,
--- 514,520 ----
  	values[Anum_pg_attribute_attisdropped - 1] = BoolGetDatum(new_attribute->attisdropped);
  	values[Anum_pg_attribute_attislocal - 1] = BoolGetDatum(new_attribute->attislocal);
  	values[Anum_pg_attribute_attinhcount - 1] = Int32GetDatum(new_attribute->attinhcount);
+ 	values[Anum_pg_attribute_attdistinct - 1] = Float8GetDatum(new_attribute->attdistinct);
  
  	/* start out with empty permissions */
  	nulls[Anum_pg_attribute_attacl - 1] = true;
***************
*** 570,575 **** AddNewAttributeTuples(Oid new_rel_oid,
--- 571,577 ----
  		attr->attrelid = new_rel_oid;
  		/* Make sure these are OK, too */
  		attr->attstattarget = -1;
+ 		attr->attdistinct = 0;
  		attr->attcacheoff = -1;
  
  		InsertPgAttributeTuple(rel, attr, indstate);
*** a/src/backend/catalog/index.c
--- b/src/backend/catalog/index.c
***************
*** 187,192 **** ConstructTupleDescriptor(Relation heapRelation,
--- 187,193 ----
  			to->attnum = i + 1;
  
  			to->attstattarget = -1;
+ 			to->attdistinct = 0;
  			to->attcacheoff = -1;
  			to->attnotnull = false;
  			to->atthasdef = false;
*** a/src/backend/commands/analyze.c
--- b/src/backend/commands/analyze.c
***************
*** 434,439 **** analyze_rel(Oid relid, VacuumStmt *vacstmt,
--- 434,448 ----
  									 std_fetch_func,
  									 numrows,
  									 totalrows);
+ 
+ 			/*
+ 			 * If the user has overridden the result of our stadistinct
+ 			 * calculation using ALTER TABLE ... ALTER COLUMN ... SET DISTINCT,
+ 			 * fill in the override value now.
+ 			 */
+ 			if (stats->attr->attdistinct != 0)
+ 				stats->stadistinct = stats->attr->attdistinct;
+ 
  			MemoryContextResetAndDeleteChildren(col_context);
  		}
  
*** a/src/backend/commands/tablecmds.c
--- b/src/backend/commands/tablecmds.c
***************
*** 283,288 **** static void ATPrepSetStatistics(Relation rel, const char *colName,
--- 283,290 ----
  					Node *flagValue);
  static void ATExecSetStatistics(Relation rel, const char *colName,
  					Node *newValue);
+ static void ATExecSetDistinct(Relation rel, const char *colName,
+ 				 Node *newValue);
  static void ATExecSetStorage(Relation rel, const char *colName,
  				 Node *newValue);
  static void ATExecDropColumn(List **wqueue, Relation rel, const char *colName,
***************
*** 2401,2406 **** ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd,
--- 2403,2414 ----
  			ATPrepSetStatistics(rel, cmd->name, cmd->def);
  			pass = AT_PASS_COL_ATTRS;
  			break;
+ 		case AT_SetDistinct:	/* ALTER COLUMN STATISTICS */
+ 			ATSimplePermissions(rel, false);
+ 			ATSimpleRecursion(wqueue, rel, cmd, recurse);
+ 			/* No command-specific prep needed */
+ 			pass = AT_PASS_COL_ATTRS;
+ 			break;
  		case AT_SetStorage:		/* ALTER COLUMN STORAGE */
  			ATSimplePermissions(rel, false);
  			ATSimpleRecursion(wqueue, rel, cmd, recurse);
***************
*** 2610,2619 **** ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel,
  		case AT_SetNotNull:		/* ALTER COLUMN SET NOT NULL */
  			ATExecSetNotNull(tab, rel, cmd->name);
  			break;
! 		case AT_SetStatistics:	/* ALTER COLUMN STATISTICS */
  			ATExecSetStatistics(rel, cmd->name, cmd->def);
  			break;
! 		case AT_SetStorage:		/* ALTER COLUMN STORAGE */
  			ATExecSetStorage(rel, cmd->name, cmd->def);
  			break;
  		case AT_DropColumn:		/* DROP COLUMN */
--- 2618,2630 ----
  		case AT_SetNotNull:		/* ALTER COLUMN SET NOT NULL */
  			ATExecSetNotNull(tab, rel, cmd->name);
  			break;
! 		case AT_SetStatistics:	/* ALTER COLUMN SET STATISTICS */
  			ATExecSetStatistics(rel, cmd->name, cmd->def);
  			break;
! 		case AT_SetDistinct:	/* ALTER COLUMN SET DISTINCT */
! 			ATExecSetDistinct(rel, cmd->name, cmd->def);
! 			break;
! 		case AT_SetStorage:		/* ALTER COLUMN SET STORAGE */
  			ATExecSetStorage(rel, cmd->name, cmd->def);
  			break;
  		case AT_DropColumn:		/* DROP COLUMN */
***************
*** 4075,4080 **** ATExecSetStatistics(Relation rel, const char *colName, Node *newValue)
--- 4086,4157 ----
  }
  
  /*
+  * ALTER TABLE ALTER COLUMN SET DISTINCT
+  */
+ static void
+ ATExecSetDistinct(Relation rel, const char *colName, Node *newValue)
+ {
+ 	float4		newdistinct;
+ 	Relation	attrelation;
+ 	HeapTuple	tuple;
+ 	Form_pg_attribute attrtuple;
+ 
+ 	switch (nodeTag(newValue))
+ 	{
+ 		case T_Integer:
+ 			newdistinct = intVal(newValue);
+ 			break;
+ 		case T_Float:
+ 			newdistinct = floatVal(newValue);
+ 			break;
+ 		default:
+ 			elog(ERROR, "unrecognized node type: %d",
+ 				 (int) nodeTag(newValue));
+ 			/* keep compiler quiet */
+ 			newdistinct = 0;
+ 	}
+ 
+ 	/*
+ 	 * Limit target to a sane range
+ 	 */
+ 	if (newdistinct < -1.0)
+ 	{
+ 		ereport(ERROR,
+ 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ 				 errmsg("number of distinct values %f is too low",
+ 						newdistinct)));
+ 	}
+ 
+ 	attrelation = heap_open(AttributeRelationId, RowExclusiveLock);
+ 
+ 	tuple = SearchSysCacheCopyAttName(RelationGetRelid(rel), colName);
+ 
+ 	if (!HeapTupleIsValid(tuple))
+ 		ereport(ERROR,
+ 				(errcode(ERRCODE_UNDEFINED_COLUMN),
+ 				 errmsg("column \"%s\" of relation \"%s\" does not exist",
+ 						colName, RelationGetRelationName(rel))));
+ 	attrtuple = (Form_pg_attribute) GETSTRUCT(tuple);
+ 
+ 	if (attrtuple->attnum <= 0)
+ 		ereport(ERROR,
+ 				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ 				 errmsg("cannot alter system column \"%s\"",
+ 						colName)));
+ 
+ 	attrtuple->attdistinct = newdistinct;
+ 
+ 	simple_heap_update(attrelation, &tuple->t_self, tuple);
+ 
+ 	/* keep system catalog indexes current */
+ 	CatalogUpdateIndexes(attrelation, tuple);
+ 
+ 	heap_freetuple(tuple);
+ 
+ 	heap_close(attrelation, RowExclusiveLock);
+ }
+ 
+ /*
   * ALTER TABLE ALTER COLUMN SET STORAGE
   */
  static void
*** a/src/backend/parser/gram.y
--- b/src/backend/parser/gram.y
***************
*** 1584,1589 **** alter_table_cmd:
--- 1584,1598 ----
  					n->def = (Node *) makeInteger($6);
  					$$ = (Node *)n;
  				}
+ 			/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET DISTINCT <SignedIconst> */
+ 			| ALTER opt_column ColId SET DISTINCT NumericOnly
+ 				{
+ 					AlterTableCmd *n = makeNode(AlterTableCmd);
+ 					n->subtype = AT_SetDistinct;
+ 					n->name = $3;
+ 					n->def = (Node *) $6;
+ 					$$ = (Node *)n;
+ 				}
  			/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */
  			| ALTER opt_column ColId SET STORAGE ColId
  				{
*** a/src/bin/pg_dump/pg_dump.c
--- b/src/bin/pg_dump/pg_dump.c
***************
*** 4637,4642 **** getTableAttrs(TableInfo *tblinfo, int numTables)
--- 4637,4643 ----
  	int			i_atttypname;
  	int			i_atttypmod;
  	int			i_attstattarget;
+ 	int			i_attdistinct;
  	int			i_attstorage;
  	int			i_typstorage;
  	int			i_attnotnull;
***************
*** 4682,4688 **** getTableAttrs(TableInfo *tblinfo, int numTables)
  
  		resetPQExpBuffer(q);
  
! 		if (g_fout->remoteVersion >= 70300)
  		{
  			/* need left join here to not fail on dropped columns ... */
  			appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, "
--- 4683,4705 ----
  
  		resetPQExpBuffer(q);
  
! 		if (g_fout->remoteVersion >= 80400)
! 		{
! 			/* attdistinct doesn't exist prior to 8.4 */
! 			appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, "
! 								 "a.attstattarget, a.attdistinct, "
! 								 "a.attstorage, t.typstorage, a.attnotnull, "
! 								 "a.atthasdef, a.attisdropped, a.attlen, "
! 								 "a.attalign, a.attislocal, "
! 				   "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname "
! 			 "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t "
! 							  "ON a.atttypid = t.oid "
! 							  "WHERE a.attrelid = '%u'::pg_catalog.oid "
! 							  "AND a.attnum > 0::pg_catalog.int2 "
! 							  "ORDER BY a.attrelid, a.attnum",
! 							  tbinfo->dobj.catId.oid);
! 		}
! 		else if (g_fout->remoteVersion >= 70300)
  		{
  			/* need left join here to not fail on dropped columns ... */
  			appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, "
***************
*** 4744,4749 **** getTableAttrs(TableInfo *tblinfo, int numTables)
--- 4761,4767 ----
  		i_atttypname = PQfnumber(res, "atttypname");
  		i_atttypmod = PQfnumber(res, "atttypmod");
  		i_attstattarget = PQfnumber(res, "attstattarget");
+ 		i_attdistinct = PQfnumber(res, "attdistinct");
  		i_attstorage = PQfnumber(res, "attstorage");
  		i_typstorage = PQfnumber(res, "typstorage");
  		i_attnotnull = PQfnumber(res, "attnotnull");
***************
*** 4758,4763 **** getTableAttrs(TableInfo *tblinfo, int numTables)
--- 4776,4782 ----
  		tbinfo->atttypnames = (char **) malloc(ntups * sizeof(char *));
  		tbinfo->atttypmod = (int *) malloc(ntups * sizeof(int));
  		tbinfo->attstattarget = (int *) malloc(ntups * sizeof(int));
+ 		tbinfo->attdistinct = (char **) malloc(ntups * sizeof(char *));
  		tbinfo->attstorage = (char *) malloc(ntups * sizeof(char));
  		tbinfo->typstorage = (char *) malloc(ntups * sizeof(char));
  		tbinfo->attisdropped = (bool *) malloc(ntups * sizeof(bool));
***************
*** 4783,4788 **** getTableAttrs(TableInfo *tblinfo, int numTables)
--- 4802,4808 ----
  			tbinfo->atttypnames[j] = strdup(PQgetvalue(res, j, i_atttypname));
  			tbinfo->atttypmod[j] = atoi(PQgetvalue(res, j, i_atttypmod));
  			tbinfo->attstattarget[j] = atoi(PQgetvalue(res, j, i_attstattarget));
+ 			tbinfo->attdistinct[j] = strdup(PQgetvalue(res, j, i_attdistinct));
  			tbinfo->attstorage[j] = *(PQgetvalue(res, j, i_attstorage));
  			tbinfo->typstorage[j] = *(PQgetvalue(res, j, i_typstorage));
  			tbinfo->attisdropped[j] = (PQgetvalue(res, j, i_attisdropped)[0] == 't');
***************
*** 9938,9943 **** dumpTableSchema(Archive *fout, TableInfo *tbinfo)
--- 9958,9979 ----
  			}
  
  			/*
+ 			 * Dump per-column distinct information. We only issue an ALTER
+ 			 * TABLE statement if the attdistinct entry for this column is
+ 			 * non-zero (i.e. it's not the default value)
+ 			 */
+ 			if (atof(tbinfo->attdistinct[j]) != 0 &&
+ 				!tbinfo->attisdropped[j])
+ 			{
+ 				appendPQExpBuffer(q, "ALTER TABLE ONLY %s ",
+ 								  fmtId(tbinfo->dobj.name));
+ 				appendPQExpBuffer(q, "ALTER COLUMN %s SET DISTINCT ",
+ 								  fmtId(tbinfo->attnames[j]));
+ 				appendStringLiteralAH(q, tbinfo->attdistinct[j], fout);
+ 				appendPQExpBuffer(q, ";\n");
+ 			}
+ 
+ 			/*
  			 * Dump per-column storage information.  The statement is only
  			 * dumped if the storage has been changed from the type's default.
  			 */
*** a/src/bin/pg_dump/pg_dump.h
--- b/src/bin/pg_dump/pg_dump.h
***************
*** 243,248 **** typedef struct _tableInfo
--- 243,249 ----
  	char	  **atttypnames;	/* attribute type names */
  	int		   *atttypmod;		/* type-specific type modifiers */
  	int		   *attstattarget;	/* attribute statistics targets */
+ 	char	  **attdistinct;	/* override ndistinct calculation */
  	char	   *attstorage;		/* attribute storage scheme */
  	char	   *typstorage;		/* type storage scheme */
  	bool	   *attisdropped;	/* true if attr is dropped; don't dump it */
*** a/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
***************
*** 970,976 **** psql_completion(char *text, int start, int end)
  		/* DROP ... does not work well yet */
  		static const char *const list_COLUMNALTER[] =
  		{"TYPE", "SET DEFAULT", "DROP DEFAULT", "SET NOT NULL",
! 		"DROP NOT NULL", "SET STATISTICS", "SET STORAGE", NULL};
  
  		COMPLETE_WITH_LIST(list_COLUMNALTER);
  	}
--- 970,977 ----
  		/* DROP ... does not work well yet */
  		static const char *const list_COLUMNALTER[] =
  		{"TYPE", "SET DEFAULT", "DROP DEFAULT", "SET NOT NULL",
! 		"DROP NOT NULL", "SET STATISTICS", "SET DISTINCT",
! 		"SET STORAGE", NULL};
  
  		COMPLETE_WITH_LIST(list_COLUMNALTER);
  	}
*** a/src/include/catalog/pg_attribute.h
--- b/src/include/catalog/pg_attribute.h
***************
*** 60,65 **** CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS
--- 60,74 ----
  	int4		attstattarget;
  
  	/*
+ 	 * If this value is non-zero, it overrides the default ndistinct
+ 	 * computation performed by ANALYZE.  If attdistinct is positive, it
+ 	 * specifies the exact number of distinct values assumed to be present in
+ 	 * this column.  If negative, the number of distinct values is assumed to
+ 	 * be attdistinct * -1.0 * (# of rows in table).
+ 	 */
+ 	float4		attdistinct;
+ 
+ 	/*
  	 * attlen is a copy of the typlen field from pg_type for this attribute.
  	 * See atttypid comments above.
  	 */
***************
*** 176,200 **** typedef FormData_pg_attribute *Form_pg_attribute;
   * ----------------
   */
  
! #define Natts_pg_attribute				18
  #define Anum_pg_attribute_attrelid		1
  #define Anum_pg_attribute_attname		2
  #define Anum_pg_attribute_atttypid		3
  #define Anum_pg_attribute_attstattarget 4
! #define Anum_pg_attribute_attlen		5
! #define Anum_pg_attribute_attnum		6
! #define Anum_pg_attribute_attndims		7
! #define Anum_pg_attribute_attcacheoff	8
! #define Anum_pg_attribute_atttypmod		9
! #define Anum_pg_attribute_attbyval		10
! #define Anum_pg_attribute_attstorage	11
! #define Anum_pg_attribute_attalign		12
! #define Anum_pg_attribute_attnotnull	13
! #define Anum_pg_attribute_atthasdef		14
! #define Anum_pg_attribute_attisdropped	15
! #define Anum_pg_attribute_attislocal	16
! #define Anum_pg_attribute_attinhcount	17
! #define Anum_pg_attribute_attacl		18
  
  
  /* ----------------
--- 185,210 ----
   * ----------------
   */
  
! #define Natts_pg_attribute				19
  #define Anum_pg_attribute_attrelid		1
  #define Anum_pg_attribute_attname		2
  #define Anum_pg_attribute_atttypid		3
  #define Anum_pg_attribute_attstattarget 4
! #define Anum_pg_attribute_attdistinct	5
! #define Anum_pg_attribute_attlen		6
! #define Anum_pg_attribute_attnum		7
! #define Anum_pg_attribute_attndims		8
! #define Anum_pg_attribute_attcacheoff	9
! #define Anum_pg_attribute_atttypmod		10
! #define Anum_pg_attribute_attbyval		11
! #define Anum_pg_attribute_attstorage	12
! #define Anum_pg_attribute_attalign		13
! #define Anum_pg_attribute_attnotnull	14
! #define Anum_pg_attribute_atthasdef		15
! #define Anum_pg_attribute_attisdropped	16
! #define Anum_pg_attribute_attislocal	17
! #define Anum_pg_attribute_attinhcount	18
! #define Anum_pg_attribute_attacl		19
  
  
  /* ----------------
***************
*** 212,459 **** typedef FormData_pg_attribute *Form_pg_attribute;
   * ----------------
   */
  #define Schema_pg_type \
! { 1247, {"typname"},	   19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typowner"},	   26, -1,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typlen"},		   21, -1,	2,	4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typbyval"},	   16, -1,	1,	5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typtype"},	   18, -1,	1,	6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typcategory"},   18, -1,	1,	7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typispreferred"},16, -1,	1,	8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typisdefined"},  16, -1,	1,	9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typdelim"},	   18, -1,	1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typrelid"},	   26, -1,	4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typelem"},	   26, -1,	4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typarray"},	   26, -1,	4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typinput"},	   24, -1,	4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typoutput"},	   24, -1,	4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typreceive"},    24, -1,	4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typsend"},	   24, -1,	4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typmodin"},	   24, -1,	4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typmodout"},	   24, -1,	4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typanalyze"},    24, -1,	4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typalign"},	   18, -1,	1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typstorage"},    18, -1,	1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typnotnull"},    16, -1,	1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typbasetype"},   26, -1,	4, 24, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typtypmod"},	   23, -1,	4, 25, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typndims"},	   23, -1,	4, 26, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typdefaultbin"}, 25, -1, -1, 27, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1247, {"typdefault"},    25, -1, -1, 28, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1247 typname			19 -1 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1247 typnamespace		26 -1 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typowner			26 -1 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typlen			21 -1 2   4 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1247 typbyval			16 -1 1   5 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typtype			18 -1 1   6 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typcategory		18 -1 1   7 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typispreferred	16 -1 1   8 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typisdefined		16 -1 1   9 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typdelim			18 -1 1  10 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typrelid			26 -1 4  11 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typelem			26 -1 4  12 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typarray			26 -1 4  13 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typinput			24 -1 4  14 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typoutput		24 -1 4  15 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typreceive		24 -1 4  16 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typsend			24 -1 4  17 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typmodin			24 -1 4  18 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typmodout		24 -1 4  19 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typanalyze		24 -1 4  20 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typalign			18 -1 1  21 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typstorage		18 -1 1  22 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typnotnull		16 -1 1  23 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typbasetype		26 -1 4  24 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typtypmod		23 -1 4  25 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typndims			23 -1 4  26 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typdefaultbin	25 -1 -1 27 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1247 typdefault		25 -1 -1 28 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1247 ctid				27 0  6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1247 oid				26 0  4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 xmin				28 0  4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 cmin				29 0  4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 xmax				28 0  4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 cmax				29 0  4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 tableoid			26 0  4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_proc
   * ----------------
   */
  #define Schema_pg_proc \
! { 1255, {"proname"},			19, -1, NAMEDATALEN,  1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronamespace"},		26, -1, 4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proowner"},			26, -1, 4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prolang"},			26, -1, 4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"procost"},		   700, -1, 4,	5, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prorows"},		   700, -1, 4,	6, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"provariadic"},		26, -1, 4,	7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proisagg"},			16, -1, 1,	8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proiswindow"},		16, -1, 1,	9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prosecdef"},			16, -1, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proisstrict"},		16, -1, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proretset"},			16, -1, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"provolatile"},		18, -1, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronargs"},			21, -1, 2, 14, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronargdefaults"},	21, -1, 2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prorettype"},			26, -1, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proargtypes"},		30, -1, -1, 17, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proallargtypes"},   1028, -1, -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargmodes"},	  1002, -1, -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargnames"},	  1009, -1, -1, 20, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargdefaults"},		25, -1, -1, 21, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"prosrc"},				25, -1, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"probin"},				17, -1, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proconfig"},		  1009, -1, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proacl"},			  1034, -1, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1255 proname			19 -1 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1255 pronamespace		26 -1 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proowner			26 -1 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 prolang			26 -1 4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 procost		   700 -1 4   5 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1255 prorows		   700 -1 4   6 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1255 provariadic		26 -1 4   7 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proisagg			16 -1 1   8 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proiswindow		16 -1 1   9 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 prosecdef		16 -1 1  10 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proisstrict		16 -1 1  11 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proretset		16 -1 1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 provolatile		18 -1 1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 pronargs			21 -1 2  14 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1255 pronargdefaults	21 -1 2  15 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1255 prorettype		26 -1 4  16 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proargtypes		30 -1 -1 17 1 -1 -1 f p i t f f t 0 _null_));
! DATA(insert ( 1255 proallargtypes 1028 -1 -1 18 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargmodes	  1002 -1 -1 19 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargnames	  1009 -1 -1 20 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargdefaults	25 -1 -1 21 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 prosrc			25 -1 -1 22 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 probin			17 -1 -1 23 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proconfig	  1009 -1 -1 24 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proacl		  1034 -1 -1 25 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 ctid				27 0  6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1255 oid				26 0  4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 xmin				28 0  4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 cmin				29 0  4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 xmax				28 0  4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 cmax				29 0  4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 tableoid			26 0  4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_attribute
   * ----------------
   */
  #define Schema_pg_attribute \
! { 1249, {"attrelid"},	  26, -1,	4,	1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attname"},	  19, -1, NAMEDATALEN,	2, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atttypid"},	  26, -1,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attstattarget"}, 23, -1,	4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attlen"},		  21, -1,	2,	5, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attnum"},		  21, -1,	2,	6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attndims"},	  23, -1,	4,	7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attcacheoff"},  23, -1,	4,	8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atttypmod"},	  23, -1,	4,	9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attbyval"},	  16, -1,	1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attstorage"},   18, -1,	1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attalign"},	  18, -1,	1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attnotnull"},   16, -1,	1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atthasdef"},	  16, -1,	1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attisdropped"}, 16, -1,	1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attislocal"},   16, -1,	1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attinhcount"},  23, -1,	4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attacl"},     1034, -1,  -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1249 attrelid			26 -1  4   1 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attname			19 -1 NAMEDATALEN  2 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1249 atttypid			26 -1  4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attstattarget	23 -1  4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attlen			21 -1  2   5 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1249 attnum			21 -1  2   6 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1249 attndims			23 -1  4   7 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attcacheoff		23 -1  4   8 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 atttypmod		23 -1  4   9 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attbyval			16 -1  1  10 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attstorage		18 -1  1  11 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attalign			18 -1  1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attnotnull		16 -1  1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 atthasdef		16 -1  1  14 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attisdropped		16 -1  1  15 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attislocal		16 -1  1  16 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attinhcount		23 -1  4  17 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attacl		  1034 -1 -1  18 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1249 ctid				27 0  6  -1 0 -1 -1 f p s t f f t 0 _null_));
  /* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin				28 0  4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 cmin				29 0  4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 xmax				28 0  4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 cmax				29 0  4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 tableoid			26 0  4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_class
   * ----------------
   */
  #define Schema_pg_class \
! { 1259, {"relname"},	   19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relnamespace"},  26, -1,	4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltype"},	   26, -1,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relowner"},	   26, -1,	4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relam"},		   26, -1,	4,	5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relfilenode"},   26, -1,	4,	6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltablespace"}, 26, -1,	4,	7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relpages"},	   23, -1,	4,	8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltuples"},	   700, -1, 4,	9, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltoastrelid"}, 26, -1,	4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltoastidxid"}, 26, -1,	4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasindex"},   16, -1,	1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relisshared"},   16, -1,	1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relistemp"},     16, -1,	1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relkind"},	   18, -1,	1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relnatts"},	   21, -1,	2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relchecks"},	   21, -1,	2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasoids"},    16, -1,	1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhaspkey"},    16, -1,	1, 19, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasrules"},   16, -1,	1, 20, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhastriggers"},16, -1,	1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhassubclass"},16, -1,	1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relfrozenxid"},  28, -1,	4, 23, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relacl"},		 1034, -1, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1259, {"reloptions"},  1009, -1, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1259 relname			19 -1 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1259 relnamespace		26 -1 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltype			26 -1 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relowner			26 -1 4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relam			26 -1 4   5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relfilenode		26 -1 4   6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltablespace	26 -1 4   7 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relpages			23 -1 4   8 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltuples	   700 -1 4   9 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1259 reltoastrelid	26 -1 4  10 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltoastidxid	26 -1 4  11 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relhasindex		16 -1 1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relisshared		16 -1 1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relistemp		16 -1 1  14 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relkind			18 -1 1  15 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relnatts			21 -1 2  16 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1259 relchecks		21 -1 2  17 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1259 relhasoids		16 -1 1  18 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhaspkey		16 -1 1  19 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhasrules		16 -1 1  20 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhastriggers	16 -1 1  21 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhassubclass	16 -1 1  22 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relfrozenxid		28 -1 4  23 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relacl		  1034 -1 -1 24 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1259 reloptions	  1009 -1 -1 25 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1259 ctid				27 0  6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1259 oid				26 0  4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 xmin				28 0  4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 cmin				29 0  4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 xmax				28 0  4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 cmax				29 0  4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 tableoid			26 0  4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_index
--- 222,471 ----
   * ----------------
   */
  #define Schema_pg_type \
! { 1247, {"typname"},	   19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typnamespace"},  26, -1, 0,	4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typowner"},	   26, -1, 0,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typlen"},		   21, -1, 0,	2,	4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typbyval"},	   16, -1, 0,	1,	5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typtype"},	   18, -1, 0,	1,	6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typcategory"},   18, -1, 0,	1,	7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typispreferred"},16, -1, 0,	1,	8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typisdefined"},  16, -1, 0,	1,	9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typdelim"},	   18, -1, 0,	1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typrelid"},	   26, -1, 0,	4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typelem"},	   26, -1, 0,	4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typarray"},	   26, -1, 0,	4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typinput"},	   24, -1, 0,	4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typoutput"},	   24, -1, 0,	4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typreceive"},    24, -1, 0,	4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typsend"},	   24, -1, 0,	4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typmodin"},	   24, -1, 0,	4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typmodout"},	   24, -1, 0,	4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typanalyze"},    24, -1, 0,	4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typalign"},	   18, -1, 0,	1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typstorage"},    18, -1, 0,	1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typnotnull"},    16, -1, 0,	1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typbasetype"},   26, -1, 0,	4, 24, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typtypmod"},	   23, -1, 0,	4, 25, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typndims"},	   23, -1, 0,	4, 26, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1247, {"typdefaultbin"}, 25, -1, 0, -1, 27, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1247, {"typdefault"},    25, -1, 0, -1, 28, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1247 typname			19 -1 0 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1247 typnamespace		26 -1 0 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typowner			26 -1 0 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typlen			21 -1 0 2   4 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1247 typbyval			16 -1 0 1   5 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typtype			18 -1 0 1   6 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typcategory		18 -1 0 1   7 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typispreferred	16 -1 0 1   8 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typisdefined		16 -1 0 1   9 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typdelim			18 -1 0 1  10 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typrelid			26 -1 0 4  11 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typelem			26 -1 0 4  12 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typarray			26 -1 0 4  13 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typinput			24 -1 0 4  14 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typoutput		24 -1 0 4  15 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typreceive		24 -1 0 4  16 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typsend			24 -1 0 4  17 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typmodin			24 -1 0 4  18 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typmodout		24 -1 0 4  19 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typanalyze		24 -1 0 4  20 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typalign			18 -1 0 1  21 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typstorage		18 -1 0 1  22 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typnotnull		16 -1 0 1  23 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1247 typbasetype		26 -1 0 4  24 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typtypmod		23 -1 0 4  25 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typndims			23 -1 0 4  26 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 typdefaultbin	25 -1 0 -1 27 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1247 typdefault		25 -1 0 -1 28 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1247 ctid				27 0  0 6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1247 oid				26 0  0 4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 xmin				28 0  0 4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 cmin				29 0  0 4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 xmax				28 0  0 4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 cmax				29 0  0 4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1247 tableoid			26 0  0 4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_proc
   * ----------------
   */
  #define Schema_pg_proc \
! { 1255, {"proname"},			19, -1, 0, NAMEDATALEN,  1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronamespace"},		26, -1, 0, 4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proowner"},			26, -1, 0, 4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prolang"},			26, -1, 0, 4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"procost"},		   700, -1, 0, 4,	5, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prorows"},		   700, -1, 0, 4,	6, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"provariadic"},		26, -1, 0, 4,	7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proisagg"},			16, -1, 0, 1,	8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proiswindow"},		16, -1, 0, 1,	9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prosecdef"},			16, -1, 0, 1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proisstrict"},		16, -1, 0, 1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proretset"},			16, -1, 0, 1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"provolatile"},		18, -1, 0, 1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronargs"},			21, -1, 0, 2, 14, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1255, {"pronargdefaults"},	21, -1, 0, 2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1255, {"prorettype"},			26, -1, 0, 4, 16, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proargtypes"},		30, -1, 0, -1, 17, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1255, {"proallargtypes"},   1028, -1, 0, -1, 18, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargmodes"},	  1002, -1, 0, -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargnames"},	  1009, -1, 0, -1, 20, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proargdefaults"},		25, -1, 0, -1, 21, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"prosrc"},				25, -1, 0, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"probin"},				17, -1, 0, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proconfig"},		  1009, -1, 0, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1255, {"proacl"},			  1034, -1, 0, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1255 proname			19 -1 0 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1255 pronamespace		26 -1 0 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proowner			26 -1 0 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 prolang			26 -1 0 4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 procost		   700 -1 0 4   5 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1255 prorows		   700 -1 0 4   6 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1255 provariadic		26 -1 0 4   7 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proisagg			16 -1 0 1   8 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proiswindow		16 -1 0 1   9 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 prosecdef		16 -1 0 1  10 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proisstrict		16 -1 0 1  11 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 proretset		16 -1 0 1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 provolatile		18 -1 0 1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1255 pronargs			21 -1 0 2  14 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1255 pronargdefaults	21 -1 0 2  15 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1255 prorettype		26 -1 0 4  16 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 proargtypes		30 -1 0 -1 17 1 -1 -1 f p i t f f t 0 _null_));
! DATA(insert ( 1255 proallargtypes 1028 -1 0 -1 18 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargmodes	  1002 -1 0 -1 19 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargnames	  1009 -1 0 -1 20 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proargdefaults	25 -1 0 -1 21 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 prosrc			25 -1 0 -1 22 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 probin			17 -1 0 -1 23 0 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proconfig	  1009 -1 0 -1 24 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 proacl		  1034 -1 0 -1 25 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1255 ctid				27 0  0 6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1255 oid				26 0  0 4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 xmin				28 0  0 4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 cmin				29 0  0 4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 xmax				28 0  0 4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 cmax				29 0  0 4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1255 tableoid			26 0  0 4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_attribute
   * ----------------
   */
  #define Schema_pg_attribute \
! { 1249, {"attrelid"},	  26, -1, 0,	4,	1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attname"},	  19, -1, 0, NAMEDATALEN,	2, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atttypid"},	  26, -1, 0,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attstattarget"}, 23, -1, 0,	4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attdistinct"},  700, -1, 0,	4,	5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attlen"},		  21, -1, 0,	2,	6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attnum"},		  21, -1, 0,	2,	7, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attndims"},	  23, -1, 0,	4,	8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attcacheoff"},  23, -1, 0,	4,	9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atttypmod"},	  23, -1, 0,	4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attbyval"},	  16, -1, 0,	1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attstorage"},   18, -1, 0,	1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attalign"},	  18, -1, 0,	1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attnotnull"},   16, -1, 0,	1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"atthasdef"},	  16, -1, 0,	1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attisdropped"}, 16, -1, 0,	1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attislocal"},   16, -1, 0,	1, 17, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attinhcount"},  23, -1, 0,	4, 18, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1249, {"attacl"},     1034, -1, 0,  -1, 19, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1249 attrelid			26 -1 0  4   1 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attname			19 -1 0 NAMEDATALEN  2 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1249 atttypid			26 -1 0  4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attstattarget	23 -1 0  4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attdistinct	   700 -1 0  4   5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attlen			21 -1 0  2   6 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1249 attnum			21 -1 0  2   7 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1249 attndims			23 -1 0  4   8 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attcacheoff		23 -1 0  4   9 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 atttypmod		23 -1 0  4  10 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attbyval			16 -1 0  1  11 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attstorage		18 -1 0  1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attalign			18 -1 0  1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attnotnull		16 -1 0  1  14 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 atthasdef		16 -1 0  1  15 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attisdropped		16 -1 0  1  16 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attislocal		16 -1 0  1  17 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1249 attinhcount		23 -1 0  4  18 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 attacl		  1034 -1 0 -1  19 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1249 ctid				27 0  0 6  -1 0 -1 -1 f p s t f f t 0 _null_));
  /* no OIDs in pg_attribute */
! DATA(insert ( 1249 xmin				28 0  0 4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 cmin				29 0  0 4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 xmax				28 0  0 4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 cmax				29 0  0 4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1249 tableoid			26 0  0 4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_class
   * ----------------
   */
  #define Schema_pg_class \
! { 1259, {"relname"},	   19, -1, 0, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relnamespace"},  26, -1, 0,	4,	2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltype"},	   26, -1, 0,	4,	3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relowner"},	   26, -1, 0,	4,	4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relam"},		   26, -1, 0,	4,	5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relfilenode"},   26, -1, 0,	4,	6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltablespace"}, 26, -1, 0,	4,	7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relpages"},	   23, -1, 0,	4,	8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltuples"},	   700, -1, 0, 4,	9, 0, -1, -1, FLOAT4PASSBYVAL, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltoastrelid"}, 26, -1, 0,	4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"reltoastidxid"}, 26, -1, 0,	4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasindex"},   16, -1, 0,	1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relisshared"},   16, -1, 0,	1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relistemp"},     16, -1, 0,	1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relkind"},	   18, -1, 0,	1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relnatts"},	   21, -1, 0,	2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relchecks"},	   21, -1, 0,	2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasoids"},    16, -1, 0,	1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhaspkey"},    16, -1, 0,	1, 19, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhasrules"},   16, -1, 0,	1, 20, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhastriggers"},16, -1, 0,	1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relhassubclass"},16, -1, 0,	1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relfrozenxid"},  28, -1, 0,	4, 23, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 1259, {"relacl"},		 1034, -1, 0, -1, 24, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 1259, {"reloptions"},  1009, -1, 0, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
! 
! DATA(insert ( 1259 relname			19 -1 0 NAMEDATALEN	1 0 -1 -1 f p c t f f t 0 _null_));
! DATA(insert ( 1259 relnamespace		26 -1 0 4   2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltype			26 -1 0 4   3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relowner			26 -1 0 4   4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relam			26 -1 0 4   5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relfilenode		26 -1 0 4   6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltablespace	26 -1 0 4   7 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relpages			23 -1 0 4   8 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltuples	   700 -1 0 4   9 0 -1 -1 FLOAT4PASSBYVAL p i t f f t 0 _null_));
! DATA(insert ( 1259 reltoastrelid	26 -1 0 4  10 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 reltoastidxid	26 -1 0 4  11 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relhasindex		16 -1 0 1  12 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relisshared		16 -1 0 1  13 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relistemp		16 -1 0 1  14 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relkind			18 -1 0 1  15 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relnatts			21 -1 0 2  16 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1259 relchecks		21 -1 0 2  17 0 -1 -1 t p s t f f t 0 _null_));
! DATA(insert ( 1259 relhasoids		16 -1 0 1  18 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhaspkey		16 -1 0 1  19 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhasrules		16 -1 0 1  20 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhastriggers	16 -1 0 1  21 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relhassubclass	16 -1 0 1  22 0 -1 -1 t p c t f f t 0 _null_));
! DATA(insert ( 1259 relfrozenxid		28 -1 0 4  23 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 relacl		  1034 -1 0 -1 24 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1259 reloptions	  1009 -1 0 -1 25 1 -1 -1 f x i f f f t 0 _null_));
! DATA(insert ( 1259 ctid				27 0  0 6  -1 0 -1 -1 f p s t f f t 0 _null_));
! DATA(insert ( 1259 oid				26 0  0 4  -2 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 xmin				28 0  0 4  -3 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 cmin				29 0  0 4  -4 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 xmax				28 0  0 4  -5 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 cmax				29 0  0 4  -6 0 -1 -1 t p i t f f t 0 _null_));
! DATA(insert ( 1259 tableoid			26 0  0 4  -7 0 -1 -1 t p i t f f t 0 _null_));
  
  /* ----------------
   *		pg_index
***************
*** 464,482 **** DATA(insert ( 1259 tableoid			26 0  4  -7 0 -1 -1 t p i t f f t 0 _null_));
   * ----------------
   */
  #define Schema_pg_index \
! { 0, {"indexrelid"},		26, -1, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indrelid"},			26, -1, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indnatts"},			21, -1, 2, 3, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisunique"},		16, -1, 1, 4, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisprimary"},		16, -1, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisclustered"},	16, -1, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisvalid"},		16, -1, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indcheckxmin"},		16, -1, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisready"},		16, -1, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indkey"},			22, -1, -1, 10, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indclass"},			30, -1, -1, 11, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indoption"},			22, -1, -1, 12, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indexprs"},			25, -1, -1, 13, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 0, {"indpred"},			25, -1, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
  
  #endif   /* PG_ATTRIBUTE_H */
--- 476,494 ----
   * ----------------
   */
  #define Schema_pg_index \
! { 0, {"indexrelid"},		26, -1, 0, 4, 1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indrelid"},			26, -1, 0, 4, 2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indnatts"},			21, -1, 0, 2, 3, 0, -1, -1, true, 'p', 's', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisunique"},		16, -1, 0, 1, 4, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisprimary"},		16, -1, 0, 1, 5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisclustered"},	16, -1, 0, 1, 6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisvalid"},		16, -1, 0, 1, 7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indcheckxmin"},		16, -1, 0, 1, 8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indisready"},		16, -1, 0, 1, 9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0, { 0 } }, \
! { 0, {"indkey"},			22, -1, 0, -1, 10, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indclass"},			30, -1, 0, -1, 11, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indoption"},			22, -1, 0, -1, 12, 1, -1, -1, false, 'p', 'i', true, false, false, true, 0, { 0 } }, \
! { 0, {"indexprs"},			25, -1, 0, -1, 13, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }, \
! { 0, {"indpred"},			25, -1, 0, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0, { 0 } }
  
  #endif   /* PG_ATTRIBUTE_H */
*** a/src/include/catalog/pg_class.h
--- b/src/include/catalog/pg_class.h
***************
*** 125,131 **** typedef FormData_pg_class *Form_pg_class;
  /* Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId */
  DATA(insert OID = 1247 (  pg_type		PGNSP 71 PGUID 0 1247 0 0 0 0 0 f f f r 28 0 t f f f f 3 _null_ _null_ ));
  DESCR("");
! DATA(insert OID = 1249 (  pg_attribute	PGNSP 75 PGUID 0 1249 0 0 0 0 0 f f f r 18 0 f f f f f 3 _null_ _null_ ));
  DESCR("");
  DATA(insert OID = 1255 (  pg_proc		PGNSP 81 PGUID 0 1255 0 0 0 0 0 f f f r 25 0 t f f f f 3 _null_ _null_ ));
  DESCR("");
--- 125,131 ----
  /* Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId */
  DATA(insert OID = 1247 (  pg_type		PGNSP 71 PGUID 0 1247 0 0 0 0 0 f f f r 28 0 t f f f f 3 _null_ _null_ ));
  DESCR("");
! DATA(insert OID = 1249 (  pg_attribute	PGNSP 75 PGUID 0 1249 0 0 0 0 0 f f f r 19 0 f f f f f 3 _null_ _null_ ));
  DESCR("");
  DATA(insert OID = 1255 (  pg_proc		PGNSP 81 PGUID 0 1255 0 0 0 0 0 f f f r 25 0 t f f f f 3 _null_ _null_ ));
  DESCR("");
*** a/src/include/nodes/parsenodes.h
--- b/src/include/nodes/parsenodes.h
***************
*** 1097,1104 **** typedef enum AlterTableType
  	AT_ColumnDefault,			/* alter column default */
  	AT_DropNotNull,				/* alter column drop not null */
  	AT_SetNotNull,				/* alter column set not null */
! 	AT_SetStatistics,			/* alter column statistics */
! 	AT_SetStorage,				/* alter column storage */
  	AT_DropColumn,				/* drop column */
  	AT_DropColumnRecurse,		/* internal to commands/tablecmds.c */
  	AT_AddIndex,				/* add index */
--- 1097,1105 ----
  	AT_ColumnDefault,			/* alter column default */
  	AT_DropNotNull,				/* alter column drop not null */
  	AT_SetNotNull,				/* alter column set not null */
! 	AT_SetStatistics,			/* alter column set statistics */
! 	AT_SetDistinct,				/* alter column set distinct */
! 	AT_SetStorage,				/* alter column set storage */
  	AT_DropColumn,				/* drop column */
  	AT_DropColumnRecurse,		/* internal to commands/tablecmds.c */
  	AT_AddIndex,				/* add index */
