diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c
index 9324a95c7683c968a2d2c2f2e18e9aaef2e4e2e1..f23c8e8657260ef70e594d8183034cb5f0815df5 100644
--- a/src/backend/access/common/tupdesc.c
+++ b/src/backend/access/common/tupdesc.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.31 1998/01/07 21:00:45 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.32 1998/01/16 23:19:16 momjian Exp $
  *
  * NOTES
  *	  some of the executor utility code such as "ExecTypeFromTL" should be
@@ -301,11 +301,12 @@ TupleDescInitEntry(TupleDesc desc,
 
 	att->attdisbursion = 0;		/* dummy value */
 	att->attcacheoff = -1;
+	att->atttypmod = 0;
 
 	att->attnum = attributeNumber;
 	att->attnelems = attdim;
 	att->attisset = attisset;
-
+	
 	att->attnotnull = false;
 	att->atthasdef = false;
 
@@ -512,17 +513,7 @@ BuildDescForRelation(List *schema, char *relname)
 					 typename);
 		}
 
-		/*
-		 * this is for char() and varchar(). When an entry is of type
-		 * char() or varchar(), typlen is set to the appropriate length,
-		 * which we'll use here instead. (The catalog lookup only returns
-		 * the length of bpchar and varchar which is not what we want!) -
-		 * ay 6/95
-		 */
-		if (entry->typename->typlen > 0)
-		{
-			desc->attrs[attnum - 1]->attlen = entry->typename->typlen;
-		}
+		desc->attrs[attnum - 1]->atttypmod = entry->typename->typmod;
 
 		/* This is for constraints */
 		if (entry->is_not_null)
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 2669a4481fa6ce00c1bbe189cb6489301fc85482..f45685ea8a24261fceec0da02b3c9757b06a394a 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.12 1998/01/06 19:42:26 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.13 1998/01/16 23:19:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -190,16 +190,9 @@ fillatt(TupleDesc tupleDesc)
 			 * and byval, since those were already set in
 			 * TupleDescInitEntry.	In fact, this seems redundant here,
 			 * but who knows what I'll break if I take it out...
-			 *
-			 * same for char() and varchar() stuff. I share the same
-			 * sentiments. This function is poorly written anyway. -ay
-			 * 6/95
 			 */
-			if (!(*attributeP)->attisset &&
-				(*attributeP)->atttypid != BPCHAROID &&
-				(*attributeP)->atttypid != VARCHAROID)
+			if (!(*attributeP)->attisset)
 			{
-
 				typp = (TypeTupleForm) GETSTRUCT(tuple);		/* XXX */
 				(*attributeP)->attlen = typp->typlen;
 				(*attributeP)->attbyval = typp->typbyval;
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index c98c877d7d25c76f8460351a4ba056394f7b7ae6..6772f8b6658cd9a0fb68c9a1adbc064dcb9430ef 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.35 1998/01/15 19:42:27 pgsql Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.36 1998/01/16 23:19:27 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -107,6 +107,7 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
  *		AttrNumber		attnum;
  *		uint32			attnelems;
  *		int32			attcacheoff;
+ *		int16			atttypmod;
  *		bool			attbyval;
  *		bool			attisset;
  *		char			attalign;
@@ -117,12 +118,12 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
  * ----------------------------------------------------------------
  */
 static FormData_pg_attribute sysatts[] = {
-	{0l, {"ctid"}, 27l, 0l, 6, -1, 0, -1, '\0', '\0', 'i', '\0', '\0'},
-	{0l, {"oid"}, 26l, 0l, 4, -2, 0, -1, '\001', '\0', 'i', '\0', '\0'},
-	{0l, {"xmin"}, 28l, 0l, 4, -3, 0, -1, '\0', '\0', 'i', '\0', '\0'},
-	{0l, {"cmin"}, 29l, 0l, 4, -4, 0, -1, '\001', '\0', 'i', '\0', '\0'},
-	{0l, {"xmax"}, 28l, 0l, 4, -5, 0, -1, '\0', '\0', 'i', '\0', '\0'},
-	{0l, {"cmax"}, 29l, 0l, 4, -6, 0, -1, '\001', '\0', 'i', '\0', '\0'},
+	{0l, {"ctid"}, 27l, 0l, 6, -1, 0, -1, 0, '\0', '\0', 'i', '\0', '\0'},
+	{0l, {"oid"},  26l, 0l, 4, -2, 0, -1, 0, '\001', '\0', 'i', '\0', '\0'},
+	{0l, {"xmin"}, 28l, 0l, 4, -3, 0, -1, 0, '\0', '\0', 'i', '\0', '\0'},
+	{0l, {"cmin"}, 29l, 0l, 4, -4, 0, -1, 0, '\001', '\0', 'i', '\0', '\0'},
+	{0l, {"xmax"}, 28l, 0l, 4, -5, 0, -1, 0, '\0', '\0', 'i', '\0', '\0'},
+	{0l, {"cmax"}, 29l, 0l, 4, -6, 0, -1, 0, '\001', '\0', 'i', '\0', '\0'},
 };
 
 /* ----------------------------------------------------------------
@@ -436,6 +437,7 @@ ConstructTupleDescriptor(Oid heapoid,
 
 		((AttributeTupleForm) to)->attnotnull = false;
 		((AttributeTupleForm) to)->atthasdef = false;
+		((AttributeTupleForm) to)->atttypmod = 0;
 
 		/*
 		 * if the keytype is defined, we need to change the tuple form's
@@ -454,11 +456,11 @@ ConstructTupleDescriptor(Oid heapoid,
 			((AttributeTupleForm) to)->atttypid = tup->t_oid;
 			((AttributeTupleForm) to)->attbyval =
 				((TypeTupleForm) ((char *) tup + tup->t_hoff))->typbyval;
-			if (IndexKeyType->typlen > 0)
-				((AttributeTupleForm) to)->attlen = IndexKeyType->typlen;
-			else
-				((AttributeTupleForm) to)->attlen =
+
+			((AttributeTupleForm) to)->attlen =
 					((TypeTupleForm) ((char *) tup + tup->t_hoff))->typlen;
+
+			((AttributeTupleForm) to)->atttypmod = IndexKeyType->typmod;
 		}
 
 
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index d9a4281ea12a16968640e08fc2727d4220a621a9..5f7bcd2d073d5c8b19f017db703049b52bb5078f 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.23 1998/01/05 16:38:44 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.24 1998/01/16 23:19:33 momjian Exp $
  *
  * NOTES
  *	  The PortalExecutorHeapMemory crap needs to be eliminated
@@ -482,11 +482,8 @@ PerformAddAttribute(char *relationName,
 		}
 		namestrcpy(&(attribute->attname), (char *) key[1].sk_argument);
 		attribute->atttypid = typeTuple->t_oid;
-		if (colDef->typename->typlen > 0)
-			attribute->attlen = colDef->typename->typlen;
-		else
-/* bpchar, varchar, text */
-			attribute->attlen = form->typlen;
+		attribute->attlen = form->typlen;
+		attribute->atttypmod = colDef->typename->typmod;
 		attribute->attnum = i;
 		attribute->attbyval = form->typbyval;
 		attribute->attnelems = attnelems;
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 9b5fbda69e8bc18685189f110af75110eb45f7b0..b3017dcd74f4af1a7d07cfae4fc7be390557f16d 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.38 1998/01/15 19:42:36 pgsql Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.39 1998/01/16 23:19:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -574,7 +574,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
 					values[i] =
 						(Datum) (*fmgr_faddr(&in_functions[i])) (string,
 												   elements[i],
-												   attr[i]->attlen);
+												   attr[i]->atttypmod);
 
 					/*
 					 * Sanity check - by reference attributes cannot
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index bf7e79d3ed1bee7ab94976d1e6ae431d2644c81a..58008dd1382bbbbf268de1bd30032fb511cdc9df 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -98,6 +98,7 @@ DefineSequence(CreateSeqStmt *seq)
 		typnam = makeNode(TypeName);
 		typnam->setof = FALSE;
 		typnam->arrayBounds = NULL;
+		typnam->typmod = 0;
 		coldef = makeNode(ColumnDef);
 		coldef->typename = typnam;
 		coldef->defval = NULL;
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 675a58d649f7c48bf5d69ad3e08b720916b2752e..2349f32411e0e63f0e747e7d1fb3d8c0a4162e08 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.15 1998/01/16 05:03:45 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.16 1998/01/16 23:19:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,7 +42,6 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "catalog/heap.h"
-#include "catalog/pg_type.h"
 
 static Pointer
 ExecBeginScan(Relation relation, int nkeys, ScanKey skeys,
@@ -125,31 +124,6 @@ ExecOpenR(Oid relationOid, bool isindex)
 	if (relation == NULL)
 		elog(DEBUG, "ExecOpenR: relation == NULL, heap_open failed.");
 
-	{
-		int i;
-		Relation trel = palloc(sizeof(RelationData));
-		TupleDesc tdesc = palloc(sizeof(struct tupleDesc));
-		AttributeTupleForm *tatt =
-				palloc(sizeof(AttributeTupleForm*)*relation->rd_att->natts);
-
-		memcpy(trel, relation, sizeof(RelationData));
-		memcpy(tdesc, relation->rd_att, sizeof(struct tupleDesc));
-		trel->rd_att = tdesc;
-		tdesc->attrs = tatt;
-		
-		for (i = 0; i < relation->rd_att->natts; i++)
-		{
-			if (relation->rd_att->attrs[i]->atttypid != VARCHAROID)
-				tdesc->attrs[i] = relation->rd_att->attrs[i];
-			else
-			{
-				tdesc->attrs[i] = palloc(sizeof(FormData_pg_attribute));
-				memcpy(tdesc->attrs[i], relation->rd_att->attrs[i],
-											sizeof(FormData_pg_attribute));
-				tdesc->attrs[i]->attlen = -1;
-			}
-		}
-	}
 	return relation;
 }
 
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index b4716cc2bb5fe6c6c12ab8b455d006e4e0bca676..ecfc4d9a952b8456410a5773aae615ed08b68841 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.38 1998/01/14 15:48:09 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.39 1998/01/16 23:19:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -563,13 +563,8 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
 				 */
 				tupdesc = CreateTupleDescCopy(tupType);
 
-				/* fixup to prevent zero-length columns in create */
-				setVarAttrLenForCreateTable(tupdesc, targetList, rangeTable);
-
 				intoRelationId = heap_create_with_catalog(intoName, tupdesc);
-#ifdef NOT_USED					/* it's copy ... */
-				resetVarAttrLenForCreateTable(tupdesc);
-#endif
+
 				FreeTupleDesc(tupdesc);
 
 				/* ----------------
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index 75f44e865ea8f48ed57e5e22c2db6ed9572b94ff..8d93ecf9cc07651c8cce7b0e65cae3d3493b6f72 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.23 1998/01/07 21:02:50 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.24 1998/01/16 23:19:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1177,76 +1177,3 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
 	if (econtext != NULL)
 		pfree(econtext);
 }
-
-/* ----------------------------------------------------------------
- * setVarAttrLenForCreateTable -
- *	  called when we do a SELECT * INTO TABLE tab
- *	  needed for attributes that have a defined length, like bpchar and
- *	  varchar
- * ----------------------------------------------------------------
- */
-void
-setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
-							List *rangeTable)
-{
-	List	   *tl;
-	TargetEntry *tle;
-	Node	   *expr;
-	int			varno;
-
-	tl = targetList;
-
-	for (varno = 0; varno < tupType->natts; varno++)
-	{
-		tle = lfirst(tl);
-
-		if (tupType->attrs[varno]->atttypid == BPCHAROID ||
-			tupType->attrs[varno]->atttypid == VARCHAROID)
-		{
-			expr = tle->expr;
-			if (expr && IsA(expr, Var))
-			{
-				Var		   *var;
-				RangeTblEntry *rtentry;
-				Relation	rd;
-
-				var = (Var *) expr;
-				rtentry = rt_fetch(var->varnoold, rangeTable);
-				rd = heap_open(rtentry->relid);
-				/* set length to that defined in relation */
-				tupType->attrs[varno]->attlen =
-					(*rd->rd_att->attrs[var->varoattno - 1]).attlen;
-				heap_close(rd);
-			}
-			else
-				elog(ERROR, "setVarAttrLenForCreateTable: can't get length for variable-length field");
-		}
-		tl = lnext(tl);
-	}
-}
-
-
-#ifdef NOT_USED					/* look at execMain.c */
-/* ----------------------------------------------------------------
- * resetVarAttrLenForCreateTable -
- *	  called when we do a SELECT * INTO TABLE tab
- *	  needed for attributes that have a defined length, like bpchar and
- *	  varchar
- *	  resets length to -1 for those types
- * ----------------------------------------------------------------
- */
-void
-resetVarAttrLenForCreateTable(TupleDesc tupType)
-{
-	int			varno;
-
-	for (varno = 0; varno < tupType->natts; varno++)
-	{
-		if (tupType->attrs[varno]->atttypid == BPCHAROID ||
-			tupType->attrs[varno]->atttypid == VARCHAROID)
-			/* set length to original -1 */
-			tupType->attrs[varno]->attlen = -1;
-	}
-}
-
-#endif
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index e0ccc63f3504c8dd4ea257d9816b2671f3f7d3ae..fe045539223572544678f039f322bce343330c1d 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.30 1998/01/15 18:59:20 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.31 1998/01/16 23:19:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1480,8 +1480,8 @@ _copyTypeName(TypeName *from)
 		newnode->name = pstrdup(from->name);
 	newnode->timezone = from->timezone;
 	newnode->setof = from->setof;
+	newnode->typmod = from->typmod;
 	Node_Copy(from, newnode, arrayBounds);
-	newnode->typlen = from->typlen;
 
 	return newnode;
 }
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index ba4b27f822c41108bc391e8acf9b88a51c12c2fd..41f3022c135e2f92733459921d91e7dbf4edb126 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.21 1998/01/15 18:59:26 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.22 1998/01/16 23:19:59 momjian Exp $
  *
  * NOTES
  *	  Every (plan) node in POSTGRES has an associated "out" routine which
@@ -137,11 +137,11 @@ _outTypeName(StringInfo str, TypeName *node)
 	appendStringInfo(str, (node->timezone ? "true" : "false"));
 	appendStringInfo(str, " :setof ");
 	appendStringInfo(str, (node->setof ? "true" : "false"));
+	appendStringInfo(str, " :typmod ");
+	sprintf(buf," %d ", node->typmod);
+	appendStringInfo(str, buf);
 	appendStringInfo(str, " :arrayBounds ");
 	_outNode(str, node->arrayBounds);
-	appendStringInfo(str, " :typlen ");
-	sprintf(buf," %d ", node->typlen);
-	appendStringInfo(str, buf);
 }
 
 static void
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c
index faf281985e4332810c9a6520451672394e341da4..e92fbb333220622046f544f20705d2674bac033d 100644
--- a/src/backend/optimizer/prep/preptlist.c
+++ b/src/backend/optimizer/prep/preptlist.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.6 1997/11/25 22:00:06 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.7 1998/01/16 23:20:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -278,13 +278,9 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
 		 */
 		attisset = get_attisset( /* type_id, */ relid, attname);
 		if (attisset)
-		{
 			typlen = typeLen(typeidType(OIDOID));
-		}
 		else
-		{
 			typlen = get_typlen(atttype);
-		}
 
 		switch (node_type)
 		{
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index d2ed0d2633f5470bb647006b21381f3664861a87..77a2e0b7c2911718ba35c5a2fde6faa566e2f0a2 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.90 1998/01/11 20:01:59 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.91 1998/01/16 23:20:14 momjian Exp $
  *
  * HISTORY
  *	  AUTHOR			DATE			MAJOR EVENT
@@ -2754,7 +2754,7 @@ Character:  character '(' Iconst ')'
 					 * between this and "text" is that we blank-pad and
 					 * truncate where necessary
 					 */
-					$$->typlen = VARHDRSZ + $3;
+					$$->typmod = VARHDRSZ + $3;
 				}
 		| character
 				{
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index c17c3e9d48ec17802ac298722612cb0ffd48fe26..00efc044dcdf7a4188b4cf3806343f19fa9a232a 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.6 1998/01/05 03:32:27 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.7 1998/01/16 23:20:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -30,7 +30,7 @@
 #include "parser/parse_target.h"
 #include "utils/builtins.h"
 
-static Node *parser_typecast(Value *expr, TypeName *typename, int typlen);
+static Node *parser_typecast(Value *expr, TypeName *typename, int atttypmod);
 
 /*
  * transformExpr -
@@ -403,7 +403,7 @@ handleNestedDots(ParseState *pstate, Attr *attr, int *curr_resno, int precedence
 }
 
 static Node	   *
-parser_typecast(Value *expr, TypeName *typename, int typlen)
+parser_typecast(Value *expr, TypeName *typename, int atttypmod)
 {
 	/* check for passing non-ints */
 	Const	   *adt;
@@ -492,7 +492,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
 	}
 #endif
 
-	cp = stringTypeString(tp, const_string, typlen);
+	cp = stringTypeString(tp, const_string, atttypmod);
 
 	if (!typeByVal(tp))
 	{
@@ -540,7 +540,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
 }
 
 Node	   *
-parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
+parser_typecast2(Node *expr, Oid exprType, Type tp, int atttypmod)
 {
 	/* check for passing non-ints */
 	Const	   *adt;
@@ -627,8 +627,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
 		return ((Node *) adt);
 	}
 
-	cp = stringTypeString(tp, const_string, typlen);
-
+	cp = stringTypeString(tp, const_string, atttypmod);
 
 	if (!typeByVal(tp))
 	{
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index 66961ca79ac6bcf6b2b4b100372374d97bc564f7..253fed7ced4af44a7365ef26bc41c672e4220421 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.6 1998/01/15 20:54:28 scrappy Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.7 1998/01/16 23:20:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -401,9 +401,9 @@ unary_oper_get_candidates(char *op,
 
 	*candidates = NULL;
 
-	fmgr_info(NameEqualRegProcedure, (func_ptr *) &opKey[0].sk_func);
+	fmgr_info(NameEqualRegProcedure, (FmgrInfo *) &opKey[0].sk_func);
 	opKey[0].sk_argument = NameGetDatum(op);
-	fmgr_info(CharacterEqualRegProcedure, (func_ptr *) &opKey[1].sk_func);
+	fmgr_info(CharacterEqualRegProcedure, (FmgrInfo *) &opKey[1].sk_func);
 	opKey[1].sk_argument = CharGetDatum(rightleft);
 
 	/* currently, only "unknown" can be coerced */
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index dc5a11a8df5a44a054f9072deb54dbc472e241af..692b1eb116ee4febef9d0748415575d68062a056 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.5 1998/01/05 03:32:30 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.6 1998/01/16 23:20:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -430,10 +430,15 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
 		elog(ERROR, "Type of %s does not match target column %s",
 			 colname, target_colname);
 
-	if ((attrtype_id == BPCHAROID || attrtype_id == VARCHAROID) &&
-		rd->rd_att->attrs[resdomno_id - 1]->attlen !=
-	pstate->p_target_relation->rd_att->attrs[resdomno_target - 1]->attlen)
-		elog(ERROR, "Length of %s does not match length of target column %s",
+	if (attrtype_id == BPCHAROID &&
+		rd->rd_att->attrs[resdomno_id - 1]->atttypmod !=
+	pstate->p_target_relation->rd_att->attrs[resdomno_target - 1]->atttypmod)
+		elog(ERROR, "Length of %s is longer than length of target column %s",
+			 colname, target_colname);
+	if (attrtype_id == VARCHAROID &&
+		rd->rd_att->attrs[resdomno_id - 1]->atttypmod >
+	pstate->p_target_relation->rd_att->attrs[resdomno_target - 1]->atttypmod)
+		elog(ERROR, "Length of %s is longer than length of target column %s",
 			 colname, target_colname);
 
 	heap_close(rd);
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index eccdbda6b4e1507d6ad886fc0ba44c42f8e59853..895411aa1da3edb677a8ef83df10d0a15cb06658 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.5 1998/01/05 03:32:31 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.6 1998/01/16 23:20:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -326,7 +326,8 @@ make_targetlist_expr(ParseState *pstate,
 	Oid			type_id,
 				attrtype;
 	int			type_len,
-				attrlen;
+				attrlen,
+				attrtypmod;
 	int			resdomno;
 	Relation	rd;
 	bool		attrisset;
@@ -360,14 +361,8 @@ make_targetlist_expr(ParseState *pstate,
 		attrtype = attnumTypeId(rd, resdomno);
 		if ((arrayRef != NIL) && (lfirst(arrayRef) == NIL))
 			attrtype = GetArrayElementType(attrtype);
-		if (attrtype == BPCHAROID || attrtype == VARCHAROID)
-		{
-			attrlen = rd->rd_att->attrs[resdomno - 1]->attlen;
-		}
-		else
-		{
-			attrlen = typeLen(typeidType(attrtype));
-		}
+		attrlen = typeLen(typeidType(attrtype));
+		attrtypmod = rd->rd_att->attrs[resdomno - 1]->atttypmod;
 #if 0
 		if (Input_is_string && Typecast_ok)
 		{
@@ -438,13 +433,13 @@ make_targetlist_expr(ParseState *pstate,
 					expr = (Node *) parser_typecast2(expr,
 													 type_id,
 													 typeidType(typelem),
-													 attrlen);
+													 attrtypmod);
 				}
 				else
 					expr = (Node *) parser_typecast2(expr,
 													 type_id,
 												   typeidType(attrtype),
-													 attrlen);
+													 attrtypmod);
 			}
 			else
 			{
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index ef238f9fd07eb12dbf1aef837ff72fa888a88187..4562623808edb3f24d18110be8c55ebade5eb703 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.3 1998/01/05 03:32:33 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.4 1998/01/16 23:20:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -136,15 +136,14 @@ typeTypeFlag(Type t)
 /* Given a type structure and a string, returns the internal form of
    that string */
 char *
-stringTypeString(Type tp, char *string, int typlen)
+stringTypeString(Type tp, char *string, int atttypmod)
 {
 	Oid			op;
 	Oid			typelem;
 
 	op = ((TypeTupleForm) GETSTRUCT(tp))->typinput;
 	typelem = ((TypeTupleForm) GETSTRUCT(tp))->typelem;	/* XXX - used for array_in */
-	/* typlen is for bpcharin() and varcharin() */
-	return ((char *) fmgr(op, string, typelem, typlen));
+	return ((char *) fmgr(op, string, typelem, atttypmod));
 }
 
 /* Given a type id, returns the out-conversion function of the type */
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index 2aaf0a58b8bd1f057856bec4211fe741071dbf31..cb17194e252eedbcc5cc96557d5df495ed6d099c 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.23 1998/01/08 06:18:18 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.24 1998/01/16 23:20:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -50,7 +50,7 @@
  *	  because we pass typelem as the second argument for array_in.)
  */
 char *
-bpcharin(char *s, int dummy, int typlen)
+bpcharin(char *s, int dummy, int atttypmod)
 {
 	char	   *result,
 			   *r;
@@ -60,23 +60,23 @@ bpcharin(char *s, int dummy, int typlen)
 	if (s == NULL)
 		return ((char *) NULL);
 
-	if (typlen == -1)
+	if (atttypmod == -1)
 	{
 
 		/*
-		 * this is here because some functions can't supply the typlen
+		 * this is here because some functions can't supply the atttypmod
 		 */
 		len = strlen(s);
-		typlen = len + VARHDRSZ;
+		atttypmod = len + VARHDRSZ;
 	}
 	else
-		len = typlen - VARHDRSZ;
+		len = atttypmod - VARHDRSZ;
 
 	if (len > 4096)
 		elog(ERROR, "bpcharin: length of char() must be less than 4096");
 
-	result = (char *) palloc(typlen);
-	VARSIZE(result) = typlen;
+	result = (char *) palloc(atttypmod);
+	VARSIZE(result) = atttypmod;
 	r = VARDATA(result);
 	for (i = 0; i < len; i++, r++, s++)
 	{
@@ -124,7 +124,7 @@ bpcharout(char *s)
  *	  because we pass typelem as the second argument for array_in.)
  */
 char *
-varcharin(char *s, int dummy, int typlen)
+varcharin(char *s, int dummy, int atttypmod)
 {
 	char	   *result;
 	int			len;
@@ -133,8 +133,8 @@ varcharin(char *s, int dummy, int typlen)
 		return ((char *) NULL);
 
 	len = strlen(s) + VARHDRSZ;
-	if (typlen != -1 && len > typlen)
-		len = typlen;	/* clip the string at max length */
+	if (atttypmod != -1 && len > atttypmod)
+		len = atttypmod;	/* clip the string at max length */
 
 	if (len > 4096)
 		elog(ERROR, "varcharin: length of char() must be less than 4096");
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index ea463e32c6544a9ca8231fd406851a8cc86f7206..1e465b5296c7aaa65a44c114906f7a140eada013 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -21,7 +21,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.59 1997/12/26 08:45:27 vadim Exp $
+ *	  $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.60 1998/01/16 23:20:39 momjian Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -924,8 +924,8 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
 			if (tblinfo[i].typnames[j])
 				free(tblinfo[i].typnames[j]);
 		}
-		if (tblinfo[i].attlen)
-			free((int *) tblinfo[i].attlen);
+		if (tblinfo[i].atttypmod)
+			free((int *) tblinfo[i].atttypmod);
 		if (tblinfo[i].inhAttrs)
 			free((int *) tblinfo[i].inhAttrs);
 		if (tblinfo[i].attnames)
@@ -1613,7 +1613,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
 	char		q[MAXQUERYLEN];
 	int			i_attname;
 	int			i_typname;
-	int			i_attlen;
+	int			i_atttypmod;
 	int			i_attnotnull;
 	int			i_atthasdef;
 	PGresult   *res;
@@ -1638,7 +1638,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
 					tblinfo[i].relname,
 					g_comment_end);
 
-		sprintf(q, "SELECT a.attnum, a.attname, t.typname, a.attlen, "
+		sprintf(q, "SELECT a.attnum, a.attname, t.typname, a.atttypmod, "
 				"a.attnotnull, a.atthasdef "
 				"from pg_attribute a, pg_type t "
 				"where a.attrelid = '%s'::oid and a.atttypid = t.oid "
@@ -1656,14 +1656,14 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
 
 		i_attname = PQfnumber(res, "attname");
 		i_typname = PQfnumber(res, "typname");
-		i_attlen = PQfnumber(res, "attlen");
+		i_atttypmod = PQfnumber(res, "atttypmod");
 		i_attnotnull = PQfnumber(res, "attnotnull");
 		i_atthasdef = PQfnumber(res, "atthasdef");
 
 		tblinfo[i].numatts = ntups;
 		tblinfo[i].attnames = (char **) malloc(ntups * sizeof(char *));
 		tblinfo[i].typnames = (char **) malloc(ntups * sizeof(char *));
-		tblinfo[i].attlen = (int *) malloc(ntups * sizeof(int));
+		tblinfo[i].atttypmod = (int *) malloc(ntups * sizeof(int));
 		tblinfo[i].inhAttrs = (int *) malloc(ntups * sizeof(int));
 		tblinfo[i].notnull = (bool *) malloc(ntups * sizeof(bool));
 		tblinfo[i].adef_expr = (char **) malloc(ntups * sizeof(char *));
@@ -1673,9 +1673,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
 		{
 			tblinfo[i].attnames[j] = strdup(PQgetvalue(res, j, i_attname));
 			tblinfo[i].typnames[j] = strdup(PQgetvalue(res, j, i_typname));
-			tblinfo[i].attlen[j] = atoi(PQgetvalue(res, j, i_attlen));
-			if (tblinfo[i].attlen[j] > 0)
-				tblinfo[i].attlen[j] = tblinfo[i].attlen[j] - VARHDRSZ;
+			tblinfo[i].atttypmod[j] = atoi(PQgetvalue(res, j, i_atttypmod));
 			tblinfo[i].inhAttrs[j] = 0; /* this flag is set in
 										 * flagInhAttrs() */
 			tblinfo[i].notnull[j] = (PQgetvalue(res, j, i_attnotnull)[0] == 't') ? true : false;
@@ -2321,11 +2319,9 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
 								(actual_atts > 0) ? ", " : "",
 								fmtId(tblinfo[i].attnames[j]));
 
-						/* stored length can be -1 (variable) */
-						if (tblinfo[i].attlen[j] > 0)
-							sprintf(q, "%s(%d)",
-									q,
-									tblinfo[i].attlen[j]);
+						sprintf(q, "%s(%d)",
+								q,
+								tblinfo[i].atttypmod[j]-VARHDRSZ);
 						actual_atts++;
 					}
 					else if (!strcmp(tblinfo[i].typnames[j], "varchar"))
@@ -2336,11 +2332,9 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
 								fmtId(tblinfo[i].attnames[j]),
 								tblinfo[i].typnames[j]);
 
-						/* stored length can be -1 (variable) */
-						if (tblinfo[i].attlen[j] > 0)
-							sprintf(q, "%s(%d)",
-									q,
-									tblinfo[i].attlen[j]);
+						sprintf(q, "%s(%d)",
+								q,
+								tblinfo[i].atttypmod[j]-VARHDRSZ);
 						actual_atts++;
 					}
 					else
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index 2e687105447891e5c96937c2642406e10fa6c1b6..9aed251ce92d1dbf753a34adcb5f40cc2c554c16 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_dump.h,v 1.28 1997/12/04 01:31:28 scrappy Exp $
+ * $Id: pg_dump.h,v 1.29 1998/01/16 23:20:43 momjian Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -86,7 +86,7 @@ typedef struct _tableInfo
 								 * needed because the SQL tables will not
 								 * have the same order of attributes as
 								 * the POSTQUEL tables */
-	int		   *attlen;			/* attribute lengths */
+	int		   *atttypmod;		/* type-specific type modifier */
 	char	   *usename;
 	int			ncheck;			/* # of CHECK expressions */
 	char	  **check_expr;		/* [CONSTRAINT name] CHECK expressions */
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 9be5e6ba23b1b1100ee29d5e7100bea0738ce74d..0c43065b8e1426f518b750fc9b12855773bb83d6 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_attribute.h,v 1.21 1997/12/04 00:27:47 scrappy Exp $
+ * $Id: pg_attribute.h,v 1.22 1998/01/16 23:20:49 momjian Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -75,8 +75,8 @@ CATALOG(pg_attribute) BOOTSTRAP
 	 * Note that (attnum - 1) is often used as the index to an array.
 	 */
 	int4		attnelems;
-	int4		attcacheoff;
 
+	int4		attcacheoff;
 	/*
 	 * fastgetattr() uses attcacheoff to cache byte offsets of attributes
 	 * in heap tuples.	The data actually stored in pg_attribute (-1)
@@ -84,8 +84,14 @@ CATALOG(pg_attribute) BOOTSTRAP
 	 * tuple descriptor, we may then update attcacheoff in the copies.
 	 * This speeds up the attribute walking process.
 	 */
-	bool		attbyval;
 
+	int2		atttypmod;
+	/*
+	 * atttypmod records type-specific modifications supplied at table
+     * creation time.
+	 */
+
+	bool		attbyval;
 	/*
 	 * attbyval is a copy of the typbyval field from pg_type for this
 	 * attribute.  See atttypid above.	See struct TypeTupleFormData for
@@ -126,25 +132,21 @@ typedef FormData_pg_attribute *AttributeTupleForm;
  * ----------------
  */
 
-#define Natts_pg_attribute				13
+#define Natts_pg_attribute				14
 #define Anum_pg_attribute_attrelid		1
 #define Anum_pg_attribute_attname		2
 #define Anum_pg_attribute_atttypid		3
-
 #define Anum_pg_attribute_attdisbursion 4
-
 #define Anum_pg_attribute_attlen		5
 #define Anum_pg_attribute_attnum		6
-
-
-
 #define Anum_pg_attribute_attnelems		7
 #define Anum_pg_attribute_attcacheoff	8
-#define Anum_pg_attribute_attbyval		9
-#define Anum_pg_attribute_attisset		10
-#define Anum_pg_attribute_attalign		11
-#define Anum_pg_attribute_attnotnull	12
-#define Anum_pg_attribute_atthasdef		13
+#define Anum_pg_attribute_atttypmod		9
+#define Anum_pg_attribute_attbyval		10
+#define Anum_pg_attribute_attisset		11
+#define Anum_pg_attribute_attalign		12
+#define Anum_pg_attribute_attnotnull	13
+#define Anum_pg_attribute_atthasdef		14
 
 
 /* ----------------
@@ -172,265 +174,267 @@ typedef FormData_pg_attribute *AttributeTupleForm;
  * ----------------
  */
 #define Schema_pg_type \
-{ 1247l, {"typname"},	   19l, 0l, NAMEDATALEN,  1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typowner"},	   26l, 0l,  4,  2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typlen"},	   21l, 0l,  2,  3, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1247l, {"typprtlen"},    21l, 0l,  2,  4, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1247l, {"typbyval"},	   16l, 0l,  1,  5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1247l, {"typtype"},	   18l, 0l,  1,  6, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1247l, {"typisdefined"}, 16l, 0l,  1,  7, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1247l, {"typdelim"},	   18l, 0l,  1,  8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1247l, {"typrelid"},	   26l, 0l,  4,  9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typelem"},	   26l, 0l,  4, 10, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typinput"},	   24l, 0l,  4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typoutput"},    24l, 0l,  4, 12, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typreceive"},   24l, 0l,  4, 13, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typsend"},	   24l, 0l,  4, 14, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247l, {"typalign"},	   18l, 0l,  1, 15, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1247l, {"typdefault"},   25l, 0l, -1, 16, 0l, -1l, '\0'  , '\0', 'i', '\0', '\0' }
-
-DATA(insert OID = 0 ( 1247 typname			19 0 NAMEDATALEN   1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1247 typowner			26 0  4   2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typlen			21 0  2   3 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1247 typprtlen		21 0  2   4 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1247 typbyval			16 0  1   5 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1247 typtype			18 0  1   6 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1247 typisdefined		16 0  1   7 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1247 typdelim			18 0  1   8 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1247 typrelid			26 0  4   9 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typelem			26 0  4  10 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typinput			24 0  4  11 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typoutput		24 0  4  12 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typreceive		24 0  4  13 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typsend			24 0  4  14 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 typalign			18 0  1  15 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1247 typdefault		25 0 -1  16 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1247 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1247 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1247 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1247 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1247 cmax				29 0  4  -6 0 -1 t f i f f));
+{ 1247l, {"typname"},	   19l, 0l, NAMEDATALEN,  1, 0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typowner"},	   26l, 0l,  4,  2, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typlen"},	   21l, 0l,  2,  3, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1247l, {"typprtlen"},    21l, 0l,  2,  4, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1247l, {"typbyval"},	   16l, 0l,  1,  5, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1247l, {"typtype"},	   18l, 0l,  1,  6, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1247l, {"typisdefined"}, 16l, 0l,  1,  7, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1247l, {"typdelim"},	   18l, 0l,  1,  8, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1247l, {"typrelid"},	   26l, 0l,  4,  9, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typelem"},	   26l, 0l,  4, 10, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typinput"},	   24l, 0l,  4, 11, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typoutput"},    24l, 0l,  4, 12, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typreceive"},   24l, 0l,  4, 13, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typsend"},	   24l, 0l,  4, 14, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247l, {"typalign"},	   18l, 0l,  1, 15, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1247l, {"typdefault"},   25l, 0l, -1, 16, 0l, -1l, 0, '\0'  , '\0', 'i', '\0', '\0' }
+
+DATA(insert OID = 0 ( 1247 typname			19 0 NAMEDATALEN   1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1247 typowner			26 0  4   2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typlen			21 0  2   3 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1247 typprtlen		21 0  2   4 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1247 typbyval			16 0  1   5 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1247 typtype			18 0  1   6 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1247 typisdefined		16 0  1   7 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1247 typdelim			18 0  1   8 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1247 typrelid			26 0  4   9 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typelem			26 0  4  10 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typinput			24 0  4  11 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typoutput		24 0  4  12 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typreceive		24 0  4  13 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typsend			24 0  4  14 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 typalign			18 0  1  15 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1247 typdefault		25 0 -1  16 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1247 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1247 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1247 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1247 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1247 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_database
  * ----------------
  */
-DATA(insert OID = 0 ( 1262 datname			19 0 NAMEDATALEN   1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1262 datdba			23 0  4   2 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1262 datpath			25 0 -1   3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1262 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1262 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1262 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1262 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1262 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1262 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1262 datname			19 0 NAMEDATALEN   1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1262 datdba			23 0  4   2 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1262 datpath			25 0 -1   3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1262 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1262 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1262 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1262 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1262 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1262 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_proc
  * ----------------
  */
 #define Schema_pg_proc \
-{ 1255l, {"proname"},		19l, 0l, NAMEDATALEN,  1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"proowner"},		26l, 0l,  4,  2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"prolang"},		26l, 0l,  4,  3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"proisinh"},		16l, 0l,  1,  4, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255l, {"proistrusted"},	16l, 0l,  1,  5, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255l, {"proiscachable"}, 16l, 0l,  1,  6, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255l, {"pronargs"},		21l, 0l,  2,  7, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1255l, {"proretset"},		16l, 0l,  1,  8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255l, {"prorettype"},	26l, 0l,  4,  9, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"proargtypes"},	30l, 0l, 32, 10, 0l, -1l,	'\0', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"probyte_pct"},	23l, 0l,  4, 11, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"properbyte_cpu"},   23l, 0l,  4, 12, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"propercall_cpu"},   23l, 0l,  4, 13, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"prooutin_ratio"},   23l, 0l,  4, 14, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"prosrc"},		25l, 0l, -1,  15,	0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1255l, {"probin"},		17l, 0l, -1,  16,	0l, -1l, '\0', '\0', 'i', '\0', '\0' }
-
-DATA(insert OID = 0 ( 1255 proname			19 0 NAMEDATALEN   1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 proowner			26 0  4   2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 prolang			26 0  4   3 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 proisinh			16 0  1   4 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1255 proistrusted		16 0  1   5 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1255 proiscachable	16 0  1   6 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1255 pronargs			21 0  2   7 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1255 proretset		16 0  1   8 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1255 prorettype		26 0  4   9 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 proargtypes		30 0 32  10 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 probyte_pct		23 0  4  11 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 properbyte_cpu	23 0  4  12 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 propercall_cpu	23 0  4  13 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 prooutin_ratio	23 0  4  14 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 prosrc			25 0 -1  15 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 probin			17 0 -1  16 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1255 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1255 cmax				29 0  4  -6 0 -1 t f i f f));
+{ 1255l, {"proname"},			19l, 0l, NAMEDATALEN,  1, 0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"proowner"},			26l, 0l,  4,  2, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"prolang"},			26l, 0l,  4,  3, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"proisinh"},			16l, 0l,  1,  4, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255l, {"proistrusted"},		16l, 0l,  1,  5, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255l, {"proiscachable"},	 	16l, 0l,  1,  6, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255l, {"pronargs"},			21l, 0l,  2,  7, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1255l, {"proretset"},			16l, 0l,  1,  8, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255l, {"prorettype"},		26l, 0l,  4,  9, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"proargtypes"},		30l, 0l, 32, 10, 0l, -1l, 0,	'\0', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"probyte_pct"},		23l, 0l,  4, 11, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"properbyte_cpu"},	23l, 0l,  4, 12, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"propercall_cpu"},	23l, 0l,  4, 13, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"prooutin_ratio"},	23l, 0l,  4, 14, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"prosrc"},			25l, 0l, -1,  15,	0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1255l, {"probin"},			17l, 0l, -1,  16,	0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }
+
+DATA(insert OID = 0 ( 1255 proname			19 0 NAMEDATALEN   1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 proowner			26 0  4   2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 prolang			26 0  4   3 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 proisinh			16 0  1   4 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1255 proistrusted		16 0  1   5 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1255 proiscachable	16 0  1   6 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1255 pronargs			21 0  2   7 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1255 proretset		16 0  1   8 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1255 prorettype		26 0  4   9 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 proargtypes		30 0 32  10 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 probyte_pct		23 0  4  11 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 properbyte_cpu	23 0  4  12 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 propercall_cpu	23 0  4  13 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 prooutin_ratio	23 0  4  14 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 prosrc			25 0 -1  15 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 probin			17 0 -1  16 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1255 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1255 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_user
  * ----------------
  */
-DATA(insert OID = 0 ( 1260 usename		19  0 NAMEDATALEN   1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1260 usesysid		23  0   4   2 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1260 usecreatedb		16  0   1   3 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1260 usetrace		16  0   1   4 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1260 usesuper		16  0   1   5 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1260 usecatupd		16  0   1   6 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1260 passwd		25  0  -1   7 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1260 valuntil		702 0   4   8 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1260 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1260 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1260 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1260 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1260 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1260 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1260 usename		19  0 NAMEDATALEN   1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1260 usesysid		23  0   4   2 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1260 usecreatedb	16  0   1   3 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1260 usetrace		16  0   1   4 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1260 usesuper		16  0   1   5 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1260 usecatupd	16  0   1   6 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1260 passwd		25  0  -1   7 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1260 valuntil		702 0   4   8 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1260 ctid			27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1260 oid			26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1260 xmin			28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1260 cmin			29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1260 xmax			28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1260 cmax			29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_group
  * ----------------
  */
-DATA(insert OID = 0 ( 1261 groname			19 0 NAMEDATALEN  1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1261 grosysid			23 0  4   2 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1261 grolist		  1007 0 -1   3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1261 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1261 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1261 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1261 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1261 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1261 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1261 groname			19 0 NAMEDATALEN  1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1261 grosysid			23 0  4   2 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1261 grolist		  1007 0 -1   3 0 0 -1 f f i f f));
+DATA(insert OID = 0 ( 1261 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1261 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1261 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1261 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1261 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1261 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_attribute
  * ----------------
  */
 #define Schema_pg_attribute \
-{ 1249l, {"attrelid"},	  26l, 0l,	4,	1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"attname"},	  19l, 0l, NAMEDATALEN,  2, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"atttypid"},	  26l, 0l,	4,	3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"attdisbursion"},   700l, 0l,  4,  4, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"attlen"},	  21l, 0l,	2,	5, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1249l, {"attnum"},	  21l, 0l,	2,	6, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1249l, {"attnelems"},   23l, 0l,	4,	7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"attcacheoff"}, 23l, 0l,	4,	8, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1249l, {"attbyval"},	  16l, 0l,	1,	9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1249l, {"attisset"},	  16l, 0l,	1, 10, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1249l, {"attalign"},	  18l, 0l,	1, 11, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 12491, {"attnotnull"},  16l, 0l,	1, 12, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 12491, {"atthasdef"},   16l, 0l,	1, 13, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }
-
-DATA(insert OID = 0 ( 1249 attrelid			26 0  4   1 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 attname			19 0 NAMEDATALEN  2 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1249 atttypid			26 0  4   3 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 attdisbursion   700 0  4   4 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1249 attlen			21 0  2   5 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1249 attnum			21 0  2   6 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1249 attnelems		23 0  4   7 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 attcacheoff		23 0  4   8 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 attbyval			16 0  1   9 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1249 attisset			16 0  1  10 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1249 attalign			18 0  1  11 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1249 attnotnull		16 0  1  12 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1249 atthasdef		16 0  1  13 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1249 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1249 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1249 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1249 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1249 cmax				29 0  4  -6 0 -1 t f i f f));
+{ 1249l, {"attrelid"},	  26l, 0l,	4,	1, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"attname"},	  19l, 0l, NAMEDATALEN,  2, 0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"atttypid"},	  26l, 0l,	4,	3, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"attdisbursion"},   700l, 0l,  4,  4, 0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"attlen"},	  21l, 0l,	2,	5, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1249l, {"attnum"},	  21l, 0l,	2,	6, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1249l, {"attnelems"},   23l, 0l,	4,	7, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"attcacheoff"}, 23l, 0l,	4,	8, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1249l, {"atttypmod"},	  21l, 0l,	2,	9, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1249l, {"attbyval"},	  16l, 0l,	1, 10, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1249l, {"attisset"},	  16l, 0l,	1, 11, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1249l, {"attalign"},	  18l, 0l,	1, 12, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 12491, {"attnotnull"},  16l, 0l,	1, 13, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 12491, {"atthasdef"},   16l, 0l,	1, 14, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }
+
+DATA(insert OID = 0 ( 1249 attrelid			26 0  4   1 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 attname			19 0 NAMEDATALEN  2 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1249 atttypid			26 0  4   3 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 attdisbursion   700 0  4   4 0 0 -1 f f i f f));
+DATA(insert OID = 0 ( 1249 attlen			21 0  2   5 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1249 attnum			21 0  2   6 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1249 attnelems		23 0  4   7 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 attcacheoff		23 0  4   8 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 atttypmod		21 0  2   9 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1249 attbyval			16 0  1  10 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1249 attisset			16 0  1  11 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1249 attalign			18 0  1  12 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1249 attnotnull		16 0  1  13 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1249 atthasdef		16 0  1  14 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1249 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1249 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1249 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1249 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1249 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_class
  * ----------------
  */
 #define Schema_pg_class \
-{ 1259l, {"relname"},	   19l, 0l, NAMEDATALEN,  1, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"reltype"},	   26l, 0l,  4,  2, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"relowner"},	   26l, 0l,  4,  3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"relam"},		   26l, 0l,  4,  4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"relpages"},	   23,	0l,  4,  5, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"reltuples"},    23,	0l,  4,  6, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259l, {"relhasindex"},  16,	0l,  1,  7, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259l, {"relisshared"},  16,	0l,  1,  8, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259l, {"relkind"},	   18,	0l,  1,  9, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259l, {"relnatts"},	   21,	0l,  2, 10, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1259l, {"relchecks"},    21l, 0l,  2, 11, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1259l, {"reltriggers"},  21l, 0l,  2, 12, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \
-{ 1259l, {"relhasrules"},  16,	0l,  1, 13, 0l, -1l, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259l, {"relacl"},	 1034l, 0l, -1, 14, 0l, -1l,   '\0', '\0', 'i', '\0', '\0' }
-
-DATA(insert OID = 0 ( 1259 relname			19 0 NAMEDATALEN   1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1259 reltype			26 0  4   2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 relowner			26 0  4   3 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 relam			26 0  4   4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 relpages			23 0  4   5 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 reltuples		23 0  4   6 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 relhasindex		16 0  1   7 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1259 relisshared		16 0  1   8 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1259 relkind			18 0  1   9 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1259 relnatts			21 0  2  10 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1259 relchecks		21 0  2  11 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1259 reltriggers		21 0  2  12 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1259 relhasrules		16 0  1  13 0 -1 t f c f f));
-DATA(insert OID = 0 ( 1259 relacl		  1034 0 -1  14 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1259 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1259 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1259 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1259 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1259 cmax				29 0  4  -6 0 -1 t f i f f));
+{ 1259l, {"relname"},	   19l, 0l, NAMEDATALEN,  1, 0l, -1l, 0, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"reltype"},	   26l, 0l,  4,  2, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"relowner"},	   26l, 0l,  4,  3, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"relam"},		   26l, 0l,  4,  4, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"relpages"},	   23,	0l,  4,  5, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"reltuples"},    23,	0l,  4,  6, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259l, {"relhasindex"},  16,	0l,  1,  7, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259l, {"relisshared"},  16,	0l,  1,  8, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259l, {"relkind"},	   18,	0l,  1,  9, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259l, {"relnatts"},	   21,	0l,  2, 10, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1259l, {"relchecks"},    21l, 0l,  2, 11, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1259l, {"reltriggers"},  21l, 0l,  2, 12, 0l, -1l, 0, '\001', '\0', 's', '\0', '\0' }, \
+{ 1259l, {"relhasrules"},  16,	0l,  1, 13, 0l, -1l, 0, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259l, {"relacl"},	 1034l, 0l, -1, 14, 0l, -1l, 0,   '\0', '\0', 'i', '\0', '\0' }
+
+DATA(insert OID = 0 ( 1259 relname			19 0 NAMEDATALEN   1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1259 reltype			26 0  4   2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 relowner			26 0  4   3 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 relam			26 0  4   4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 relpages			23 0  4   5 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 reltuples		23 0  4   6 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 relhasindex		16 0  1   7 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1259 relisshared		16 0  1   8 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1259 relkind			18 0  1   9 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1259 relnatts			21 0  2  10 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1259 relchecks		21 0  2  11 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1259 reltriggers		21 0  2  12 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1259 relhasrules		16 0  1  13 0 -1 0 t f c f f));
+DATA(insert OID = 0 ( 1259 relacl		  1034 0 -1  14 0 0 -1 f f i f f));
+DATA(insert OID = 0 ( 1259 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1259 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1259 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1259 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1259 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_attrdef
  * ----------------
  */
-DATA(insert OID = 0 ( 1215 adrelid			26 0  4   1 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1215 adnum			21 0  2   2 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1215 adbin			25 0 -1   3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1215 adsrc			25 0 -1   4 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1215 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1215 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1215 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1215 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1215 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1215 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1215 adrelid			26 0  4   1 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1215 adnum			21 0  2   2 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1215 adbin			25 0 -1   3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1215 adsrc			25 0 -1   4 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1215 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1215 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1215 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1215 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1215 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1215 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_relcheck
  * ----------------
  */
-DATA(insert OID = 0 ( 1216 rcrelid			26 0  4   1 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1216 rcname			19 0  NAMEDATALEN  2 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 rcbin			25 0 -1   3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 rcsrc			25 0 -1   4 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1216 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1216 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1216 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1216 rcrelid			26 0  4   1 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1216 rcname			19 0  NAMEDATALEN  2 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 rcbin			25 0 -1   3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 rcsrc			25 0 -1   4 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1216 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1216 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1216 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_trigger
  * ----------------
  */
-DATA(insert OID = 0 ( 1219 tgrelid			26 0  4   1 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1219 tgname			19 0  NAMEDATALEN  2 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 tgfoid			26 0  4   3 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1219 tgtype			21 0  2   4 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1219 tgnargs			21 0  2   5 0 -1 t f s f f));
-DATA(insert OID = 0 ( 1219 tgattr			22 0 16   6 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 tgargs			17 0 -1   7 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 ctid				27 0  6  -1 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 oid				26 0  4  -2 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1219 xmin				28 0  4  -3 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 cmin				29 0  4  -4 0 -1 t f i f f));
-DATA(insert OID = 0 ( 1219 xmax				28 0  4  -5 0 -1 f f i f f));
-DATA(insert OID = 0 ( 1219 cmax				29 0  4  -6 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1219 tgrelid			26 0  4   1 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1219 tgname			19 0  NAMEDATALEN  2 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 tgfoid			26 0  4   3 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1219 tgtype			21 0  2   4 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1219 tgnargs			21 0  2   5 0 -1 0 t f s f f));
+DATA(insert OID = 0 ( 1219 tgattr			22 0 16   6 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 tgargs			17 0 -1   7 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 ctid				27 0  6  -1 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 oid				26 0  4  -2 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1219 xmin				28 0  4  -3 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 cmin				29 0  4  -4 0 -1 0 t f i f f));
+DATA(insert OID = 0 ( 1219 xmax				28 0  4  -5 0 -1 0 f f i f f));
+DATA(insert OID = 0 ( 1219 cmax				29 0  4  -6 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_variable - this relation is modified by special purpose access
@@ -439,9 +443,9 @@ DATA(insert OID = 0 ( 1219 cmax				29 0  4  -6 0 -1 t f i f f));
  * ----------------
  */
 #define Schema_pg_variable \
-{ 1264l, {"varfoo"},  26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }
+{ 1264l, {"varfoo"},  26l, 0l, 4, 1, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }
 
-DATA(insert OID = 0 ( 1264 varfoo			26 0  4   1 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1264 varfoo			26 0  4   1 0 -1 0 t f i f f));
 
 /* ----------------
  *		pg_log - this relation is modified by special purpose access
@@ -450,8 +454,8 @@ DATA(insert OID = 0 ( 1264 varfoo			26 0  4   1 0 -1 t f i f f));
  * ----------------
  */
 #define Schema_pg_log \
-{ 1269l, {"logfoo"},  26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }
+{ 1269l, {"logfoo"},  26l, 0l, 4, 1, 0l, -1l, 0, '\001', '\0', 'i', '\0', '\0' }
 
-DATA(insert OID = 0 ( 1269 logfoo			26 0  4   1 0 -1 t f i f f));
+DATA(insert OID = 0 ( 1269 logfoo			26 0  4   1 0 -1 0 t f i f f));
 
 #endif							/* PG_ATTRIBUTE_H */
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 7c0ee50fec9c8fad3fd465452ef98b6dc42f8566..b70ceba2cee91125083104ff5d663feb8bef0cfa 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_class.h,v 1.17 1997/12/04 00:27:50 scrappy Exp $
+ * $Id: pg_class.h,v 1.18 1998/01/16 23:20:52 momjian Exp $
  *
  * NOTES
  *	  ``pg_relation'' is being replaced by ``pg_class''.  currently
@@ -119,11 +119,11 @@ typedef FormData_pg_class *Form_pg_class;
 
 DATA(insert OID = 1247 (  pg_type 71		  PGUID 0 0 0 f f r 16 0 0 f _null_ ));
 DESCR("");
-DATA(insert OID = 1249 (  pg_attribute 75	  PGUID 0 0 0 f f r 16 0 0 f _null_ ));
+DATA(insert OID = 1249 (  pg_attribute 75	  PGUID 0 0 0 f f r 14 0 0 f _null_ ));
 DESCR("");
 DATA(insert OID = 1255 (  pg_proc 81		  PGUID 0 0 0 f f r 16 0 0 f _null_ ));
 DESCR("");
-DATA(insert OID = 1259 (  pg_class 83		  PGUID 0 0 0 f f r 18 0 0 f _null_ ));
+DATA(insert OID = 1259 (  pg_class 83		  PGUID 0 0 0 f f r 14 0 0 f _null_ ));
 DESCR("");
 DATA(insert OID = 1260 (  pg_user 86		  PGUID 0 0 0 f t r 8  0 0 f _null_ ));
 DESCR("");
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c56363ddf0c8a80fe679529f742c8afdb174de01..02fa069df61d483c7e724540c4ab5d08e6808b42 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: parsenodes.h,v 1.44 1998/01/15 19:00:11 momjian Exp $
+ * $Id: parsenodes.h,v 1.45 1998/01/16 23:20:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -642,8 +642,8 @@ typedef struct TypeName
 	char	   *name;			/* name of the type */
 	bool		timezone;		/* timezone specified? */
 	bool		setof;			/* is a set? */
+	int2		typmod;			/* type modifier */
 	List	   *arrayBounds;	/* array bounds */
-	int			typlen;			/* length for char() and varchar() */
 } TypeName;
 
 /*
diff --git a/src/include/parser/parse_expr.h b/src/include/parser/parse_expr.h
index ba8eed9c814b7d33ec4106e184f5349c52d92106..42cbe9c46161ad759048962528cfc126f454ce48 100644
--- a/src/include/parser/parse_expr.h
+++ b/src/include/parser/parse_expr.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: parse_expr.h,v 1.4 1998/01/04 04:31:41 momjian Exp $
+ * $Id: parse_expr.h,v 1.5 1998/01/16 23:21:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,7 +23,7 @@ extern Node *transformIdent(ParseState *pstate, Node *expr, int precedence);
 extern Oid exprType(Node *expr);
 extern Node *handleNestedDots(ParseState *pstate, Attr *attr,
 		int *curr_resno, int precedence);
-extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen);
+extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int attypmod);
 
 #endif							/* PARSE_EXPR_H */
 
diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h
index fa2025994c75fee3bc505342a920a0453b6abe8b..22a81c4994f3eeb7802d5688f8ee1e8547473627 100644
--- a/src/include/parser/parse_type.h
+++ b/src/include/parser/parse_type.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: parse_type.h,v 1.2 1997/11/26 01:14:14 momjian Exp $
+ * $Id: parse_type.h,v 1.3 1998/01/16 23:21:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -26,7 +26,7 @@ extern int16 typeLen(Type t);
 extern bool typeByVal(Type t);
 extern char *typeTypeName(Type t);
 extern char typeTypeFlag(Type t);
-extern char *stringTypeString(Type tp, char *string, int typlen);
+extern char *stringTypeString(Type tp, char *string, int atttypmod);
 extern Oid typeidRetoutfunc(Oid type_id);
 extern Oid typeidTypeRelid(Oid type_id);
 extern Oid typeTypeRelid(Type typ);
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 0c8e5554cb6d085b789eb58ec92e947bd5dc1b0f..b10769ee7d5fd8830024e1793b160655a5748275 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: builtins.h,v 1.33 1998/01/01 05:42:40 thomas Exp $
+ * $Id: builtins.h,v 1.34 1998/01/16 23:21:07 momjian Exp $
  *
  * NOTES
  *	  This should normally only be included by fmgr.h.
@@ -445,7 +445,7 @@ DateTime   *timestamp_datetime(time_t timestamp);
 time_t		datetime_timestamp(DateTime *datetime);
 
 /* varchar.c */
-extern char *bpcharin(char *s, int dummy, int typlen);
+extern char *bpcharin(char *s, int dummy, int atttypmod);
 extern char *bpcharout(char *s);
 extern bool bpchareq(char *arg1, char *arg2);
 extern bool bpcharne(char *arg1, char *arg2);
@@ -457,7 +457,7 @@ extern int32 bpcharcmp(char *arg1, char *arg2);
 extern int32 bpcharlen(char *arg);
 extern uint32 hashbpchar(struct varlena * key);
 
-extern char *varcharin(char *s, int dummy, int typlen);
+extern char *varcharin(char *s, int dummy, int atttypmod);
 extern char *varcharout(char *s);
 extern bool varchareq(char *arg1, char *arg2);
 extern bool varcharne(char *arg1, char *arg2);