diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index c3d6326d42a724f3f06b38371e4ed6cd27d5ce29..6b0d4de720e0b6643f7a9048757cad47b4ef0946 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.109 2001/08/25 18:52:41 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.110 2001/09/28 08:08:57 thomas Exp $
  *
  * NOTES
  *		Transaction aborts can now occur two ways:
@@ -369,6 +369,21 @@ GetCurrentTransactionStartTime(void)
 }
 
 
+/* --------------------------------
+ *		GetCurrentTransactionStartTimeUsec
+ * --------------------------------
+ */
+AbsoluteTime
+GetCurrentTransactionStartTimeUsec(int *msec)
+{
+	TransactionState s = CurrentTransactionState;
+
+	*msec = s->startTimeMsec;
+
+	return s->startTime;
+}
+
+
 /* --------------------------------
  *		TransactionIdIsCurrentTransactionId
  * --------------------------------
@@ -859,7 +874,10 @@ StartTransaction(void)
 	 */
 	s->commandId = FirstCommandId;
 	s->scanCommandId = FirstCommandId;
+#if NOT_USED
 	s->startTime = GetCurrentAbsoluteTime();
+#endif
+	s->startTime = GetCurrentAbsoluteTimeUsec(&(s->startTimeMsec));
 
 	/*
 	 * initialize the various transaction subsystems
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 64d71d28bd7d73cee76569fe48b235710ea0bfa3..0298742c611278073708dc2cce4c75228b6c7bb4 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.253 2001/09/23 03:39:01 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.254 2001/09/28 08:09:09 thomas Exp $
  *
  * HISTORY
  *	  AUTHOR			DATE			MAJOR EVENT
@@ -259,7 +259,7 @@ static void doNegateFloat(Value *v);
 %type <str>		opt_charset, opt_collate
 %type <str>		opt_float
 %type <ival>	opt_numeric, opt_decimal
-%type <boolean>	opt_varying, opt_timezone
+%type <boolean>	opt_varying, opt_timezone, opt_timezone_x
 
 %type <ival>	Iconst
 %type <str>		Sconst, comment_text
@@ -4229,10 +4229,16 @@ ConstDatetime:  datetime
 					$$->name = xlateSqlType($1);
 					$$->typmod = -1;
 				}
-		| TIMESTAMP opt_timezone
+		| TIMESTAMP opt_timezone_x
 				{
 					$$ = makeNode(TypeName);
-					$$->name = xlateSqlType("timestamp");
+					if ($2)
+						$$->name = xlateSqlType("timestamptz");
+					else
+						$$->name = xlateSqlType("timestamp");
+					/* XXX the timezone field seems to be unused
+					 * - thomas 2001-09-06
+					 */
 					$$->timezone = $2;
 					$$->typmod = -1;
 				}
@@ -4263,6 +4269,16 @@ datetime:  YEAR_P								{ $$ = "year"; }
 		| SECOND_P								{ $$ = "second"; }
 		;
 
+/* XXX Make the default be WITH TIME ZONE for 7.2 to help with database upgrades
+ * but revert this back to WITHOUT TIME ZONE for 7.3.
+ * Do this by simply reverting opt_timezone_x to opt_timezone - thomas 2001-09-06
+ */
+
+opt_timezone_x:  WITH TIME ZONE					{ $$ = TRUE; }
+		| WITHOUT TIME ZONE						{ $$ = FALSE; }
+		| /*EMPTY*/								{ $$ = TRUE; }
+		;
+
 opt_timezone:  WITH TIME ZONE					{ $$ = TRUE; }
 		| WITHOUT TIME ZONE						{ $$ = FALSE; }
 		| /*EMPTY*/								{ $$ = FALSE; }
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 5f769a81eacfe5e33fa3eb14a987ed7f1070ab33..80164f86b3a013d386d1035f33a3e17ae0d24975 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.60 2001/06/24 02:41:21 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.61 2001/09/28 08:09:09 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -240,7 +240,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
 		oid_array[0] = inputTypeId;
 
 		ftup = SearchSysCache(PROCNAME,
-						   PointerGetDatum(typeidTypeName(targetTypeId)),
+							  PointerGetDatum(typeidTypeName(targetTypeId)),
 							  Int32GetDatum(1),
 							  PointerGetDatum(oid_array),
 							  0);
@@ -498,6 +498,7 @@ TypeCategory(Oid inType)
 		case (TIMETZOID):
 		case (ABSTIMEOID):
 		case (TIMESTAMPOID):
+		case (TIMESTAMPTZOID):
 			result = DATETIME_TYPE;
 			break;
 
@@ -577,7 +578,10 @@ PreferredType(CATEGORY category, Oid type)
 			break;
 
 		case (DATETIME_TYPE):
-			result = TIMESTAMPOID;
+			if (type == DATEOID)
+				result = TIMESTAMPOID;
+			else
+				result = TIMESTAMPTZOID;
 			break;
 
 		case (TIMESPAN_TYPE):
@@ -634,10 +638,14 @@ PromoteTypeToNext(Oid inType)
 			break;
 
 		case (DATEOID):
-		case (ABSTIMEOID):
 			result = TIMESTAMPOID;
 			break;
 
+		case (ABSTIMEOID):
+		case (TIMESTAMPOID):
+			result = TIMESTAMPTZOID;
+			break;
+
 		case (TIMEOID):
 		case (RELTIMEOID):
 			result = INTERVALOID;
@@ -646,7 +654,7 @@ PromoteTypeToNext(Oid inType)
 		case (BOOLOID):
 		case (TEXTOID):
 		case (FLOAT8OID):
-		case (TIMESTAMPOID):
+		case (TIMESTAMPTZOID):
 		case (INTERVALOID):
 		default:
 			result = inType;
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index e1574993529814cfffd753cfb60ed3d26e6eb36a..d1512c61c0e61b43fd81a62cb3e5fe825f9842eb 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.101 2001/09/20 23:31:08 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.102 2001/09/28 08:09:09 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -40,11 +40,11 @@ bool		Transform_null_equals = false;
 
 static Node *parser_typecast_constant(Value *expr, TypeName *typename);
 static Node *parser_typecast_expression(ParseState *pstate,
-						   Node *expr, TypeName *typename);
+										Node *expr, TypeName *typename);
 static Node *transformAttr(ParseState *pstate, Attr *att, int precedence);
 static Node *transformIdent(ParseState *pstate, Ident *ident, int precedence);
 static Node *transformIndirection(ParseState *pstate, Node *basenode,
-					 List *indirection);
+								  List *indirection);
 
 
 /*
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index a39e3108804286ab3d44e6cc3b15e73906014aa1..c40792072b13b7f810ad8448d86ad1b5658df183 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.72 2001/09/17 01:06:36 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.73 2001/09/28 08:09:09 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -462,10 +462,13 @@ FigureColname(Node *node)
 {
 	if (node == NULL)
 		return "?column?";
+
 	switch (nodeTag(node))
 	{
 		case T_Ident:
 			return ((Ident *) node)->name;
+		case T_A_Const:
+			return (FigureColname((Node *)((A_Const *) node)->typename));
 		case T_Attr:
 			{
 				List	   *attrs = ((Attr *) node)->attrs;
@@ -481,7 +484,15 @@ FigureColname(Node *node)
 		case T_FuncCall:
 			return ((FuncCall *) node)->funcname;
 		case T_TypeCast: 
-			return FigureColname(((TypeCast *) node)->arg);
+			{
+				char	   *name;
+
+				name = FigureColname(((TypeCast *) node)->arg);
+				if (strcmp(name, "?column?") == 0)
+				  name = FigureColname((Node *)((TypeCast *) node)->typename);
+				return name;
+			}
+			break;
 		case T_CaseExpr:
 			{
 				char	   *name;
@@ -492,6 +503,8 @@ FigureColname(Node *node)
 				return name;
 			}
 			break;
+		case T_TypeName:
+			return ((TypeName *) node)->name;
 		default:
 			break;
 	}
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 4504f5f043c27bd8805f01f9b9204c00e1fbd8df..36b3a52de254bdd6db8ef1ecbb0556ae2df6449f 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -8,21 +8,24 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.57 2001/05/03 19:00:36 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.58 2001/09/28 08:09:10 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
+#include <ctype.h>
 #include <limits.h>
 #include <time.h>
 #include <float.h>
 
 #include "access/hash.h"
 #include "miscadmin.h"
+#include "utils/builtins.h"
 #include "utils/date.h"
 #include "utils/nabstime.h"
+#include "utils/timestamp.h"
 
 
 /*****************************************************************************
@@ -58,13 +61,13 @@ date_in(PG_FUNCTION_ARGS)
 			break;
 
 		case DTK_CURRENT:
+			elog(ERROR, "Date CURRENT no longer supported"
+				 "\n\tdate_in() internal coding error");
 			GetCurrentTime(tm);
 			break;
 
 		case DTK_EPOCH:
-			tm->tm_year = 1970;
-			tm->tm_mon = 1;
-			tm->tm_mday = 1;
+			GetEpochTime(tm);
 			break;
 
 		default:
@@ -224,6 +227,46 @@ date_timestamp(PG_FUNCTION_ARGS)
 {
 	DateADT		dateVal = PG_GETARG_DATEADT(0);
 	Timestamp	result;
+
+	/* date is days since 2000, timestamp is seconds since same... */
+	result = dateVal * 86400.0;
+
+	PG_RETURN_TIMESTAMP(result);
+}
+
+
+/* timestamp_date()
+ * Convert timestamp to date data type.
+ */
+Datum
+timestamp_date(PG_FUNCTION_ARGS)
+{
+	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	DateADT		result;
+	struct tm	tt,
+			   *tm = &tt;
+	double		fsec;
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+		PG_RETURN_NULL();
+
+	if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) != 0)
+		elog(ERROR, "Unable to convert timestamp to date");
+
+	result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
+
+	PG_RETURN_DATEADT(result);
+}
+
+
+/* date_timestamptz()
+ * Convert date to timestamp with time zone data type.
+ */
+Datum
+date_timestamptz(PG_FUNCTION_ARGS)
+{
+	DateADT		dateVal = PG_GETARG_DATEADT(0);
+	TimestampTz	result;
 	struct tm	tt,
 			   *tm = &tt;
 	time_t		utime;
@@ -259,32 +302,25 @@ date_timestamp(PG_FUNCTION_ARGS)
 }
 
 
-/* timestamp_date()
- * Convert timestamp to date data type.
+/* timestamptz_date()
+ * Convert timestamp with time zone to date data type.
  */
 Datum
-timestamp_date(PG_FUNCTION_ARGS)
+timestamptz_date(PG_FUNCTION_ARGS)
 {
-	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
 	DateADT		result;
 	struct tm	tt,
 			   *tm = &tt;
-	int			tz;
 	double		fsec;
+	int			tz;
 	char	   *tzn;
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		elog(ERROR, "Unable to convert timestamp to date");
+		PG_RETURN_NULL();
 
-	if (TIMESTAMP_IS_EPOCH(timestamp))
-		timestamp2tm(SetTimestamp(timestamp), NULL, tm, &fsec, NULL);
-	else if (TIMESTAMP_IS_CURRENT(timestamp))
-		timestamp2tm(SetTimestamp(timestamp), &tz, tm, &fsec, &tzn);
-	else
-	{
-		if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
-			elog(ERROR, "Unable to convert timestamp to date");
-	}
+	if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+		elog(ERROR, "Unable to convert timestamp to date");
 
 	result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
 
@@ -316,15 +352,6 @@ abstime_date(PG_FUNCTION_ARGS)
 			 * will be set
 			 */
 
-		case EPOCH_ABSTIME:
-			result = date2j(1970, 1, 1) - date2j(2000, 1, 1);
-			break;
-
-		case CURRENT_ABSTIME:
-			GetCurrentTime(tm);
-			result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
-			break;
-
 		default:
 			abstime2tm(abstime, &tz, tm, NULL);
 			result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
@@ -664,22 +691,13 @@ timestamp_time(PG_FUNCTION_ARGS)
 	TimeADT		result;
 	struct tm	tt,
 			   *tm = &tt;
-	int			tz;
 	double		fsec;
-	char	   *tzn;
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		elog(ERROR, "Unable to convert timestamp to date");
+		PG_RETURN_NULL();
 
-	if (TIMESTAMP_IS_EPOCH(timestamp))
-		timestamp2tm(SetTimestamp(timestamp), NULL, tm, &fsec, NULL);
-	else if (TIMESTAMP_IS_CURRENT(timestamp))
-		timestamp2tm(SetTimestamp(timestamp), &tz, tm, &fsec, &tzn);
-	else
-	{
-		if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
-			elog(ERROR, "Unable to convert timestamp to date");
-	}
+	if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) != 0)
+		elog(ERROR, "Unable to convert timestamp to date");
 
 	result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec + fsec);
 
@@ -736,6 +754,24 @@ interval_time(PG_FUNCTION_ARGS)
 	PG_RETURN_TIMEADT(result);
 }
 
+/* time_mi_time()
+ * Subtract two times to produce an interval.
+ */
+Datum
+time_mi_time(PG_FUNCTION_ARGS)
+{
+	TimeADT		time1 = PG_GETARG_TIMEADT(0);
+	TimeADT		time2 = PG_GETARG_TIMEADT(1);
+	Interval   *result;
+
+	result = (Interval *) palloc(sizeof(Interval));
+
+	result->time = time2 - time1;
+	result->month = 0;
+
+	PG_RETURN_INTERVAL_P(result);
+}
+
 /* time_pl_interval()
  * Add interval to time.
  */
@@ -918,7 +954,12 @@ timetz_cmp_internal(TimeTzADT *time1, TimeTzADT *time2)
 	 * If same GMT time, sort by timezone; we only want to say that two
 	 * timetz's are equal if both the time and zone parts are equal.
 	 */
-	return time1->zone - time2->zone;
+	if (time1->zone > time2->zone)
+		return 1;
+	if (time1->zone < time2->zone)
+		return -1;
+
+	return 0;
 }
 
 Datum
@@ -1199,13 +1240,48 @@ overlaps_timetz(PG_FUNCTION_ARGS)
 #undef TIMETZ_LT
 }
 
-/* timestamp_timetz()
+
+Datum
+timetz_time(PG_FUNCTION_ARGS)
+{
+	TimeTzADT  *timetz = PG_GETARG_TIMETZADT_P(0);
+	TimeADT		result;
+
+	/* swallow the time zone and just return the time */
+	result = timetz->time;
+
+	PG_RETURN_TIMEADT(result);
+}
+
+
+Datum
+time_timetz(PG_FUNCTION_ARGS)
+{
+	TimeADT		time = PG_GETARG_TIMEADT(0);
+	TimeTzADT  *result;
+	struct tm	tt,
+			   *tm = &tt;
+	int			tz;
+
+	GetCurrentTime(tm);
+	tz = DetermineLocalTimeZone(tm);
+
+	result = (TimeTzADT *) palloc(sizeof(TimeTzADT));
+
+	result->time = time;
+	result->zone = tz;
+
+	PG_RETURN_TIMETZADT_P(result);
+}
+
+
+/* timestamptz_timetz()
  * Convert timestamp to timetz data type.
  */
 Datum
-timestamp_timetz(PG_FUNCTION_ARGS)
+timestamptz_timetz(PG_FUNCTION_ARGS)
 {
-	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
 	TimeTzADT  *result;
 	struct tm	tt,
 			   *tm = &tt;
@@ -1214,20 +1290,10 @@ timestamp_timetz(PG_FUNCTION_ARGS)
 	char	   *tzn;
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		elog(ERROR, "Unable to convert timestamp to date");
+		PG_RETURN_NULL();
 
-	if (TIMESTAMP_IS_EPOCH(timestamp))
-	{
-		timestamp2tm(SetTimestamp(timestamp), NULL, tm, &fsec, NULL);
-		tz = 0;
-	}
-	else if (TIMESTAMP_IS_CURRENT(timestamp))
-		timestamp2tm(SetTimestamp(timestamp), &tz, tm, &fsec, &tzn);
-	else
-	{
-		if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
-			elog(ERROR, "Unable to convert timestamp to date");
-	}
+	if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+		elog(ERROR, "Unable to convert timestamp to date");
 
 	result = (TimeTzADT *) palloc(sizeof(TimeTzADT));
 
@@ -1238,18 +1304,18 @@ timestamp_timetz(PG_FUNCTION_ARGS)
 }
 
 
-/* datetimetz_timestamp()
- * Convert date and timetz to timestamp data type.
+/* datetimetz_timestamptz()
+ * Convert date and timetz to timestamp with time zone data type.
  * Timestamp is stored in GMT, so add the time zone
  * stored with the timetz to the result.
  * - thomas 2000-03-10
  */
 Datum
-datetimetz_timestamp(PG_FUNCTION_ARGS)
+datetimetz_timestamptz(PG_FUNCTION_ARGS)
 {
 	DateADT		date = PG_GETARG_DATEADT(0);
 	TimeTzADT  *time = PG_GETARG_TIMETZADT_P(1);
-	Timestamp	result;
+	TimestampTz	result;
 
 	result = date * 86400.0 + time->time + time->zone;
 
@@ -1310,3 +1376,83 @@ text_timetz(PG_FUNCTION_ARGS)
 	return DirectFunctionCall1(timetz_in,
 							   CStringGetDatum(dstr));
 }
+
+/* timetz_zone()
+ * Encode time with time zone type with specified time zone.
+ */
+Datum
+timetz_zone(PG_FUNCTION_ARGS)
+{
+	text	   *zone = PG_GETARG_TEXT_P(0);
+	TimeTzADT  *time = PG_GETARG_TIMETZADT_P(1);
+	TimeTzADT  *result;
+	TimeADT		time1;
+	int			tz;
+	int			type,
+				val;
+	int			i;
+	char	   *up,
+			   *lp,
+				lowzone[MAXDATELEN + 1];
+
+	if (VARSIZE(zone) - VARHDRSZ > MAXDATELEN)
+		elog(ERROR, "Time zone '%s' not recognized",
+			 DatumGetCString(DirectFunctionCall1(textout,
+												 PointerGetDatum(zone))));
+	up = VARDATA(zone);
+	lp = lowzone;
+	for (i = 0; i < (VARSIZE(zone) - VARHDRSZ); i++)
+		*lp++ = tolower((unsigned char) *up++);
+	*lp = '\0';
+
+	type = DecodeSpecial(0, lowzone, &val);
+
+	result = (TimeTzADT *) palloc(sizeof(TimeTzADT));
+
+	if ((type == TZ) || (type == DTZ))
+	{
+		tz = val * 60;
+		time1 = time->time - time->zone + tz;
+		TMODULO(result->time, time1, 86400e0);
+		if (result->time < 0)
+			result->time += 86400;
+		result->zone = tz;
+	}
+	else
+	{
+		elog(ERROR, "Time zone '%s' not recognized", lowzone);
+		PG_RETURN_NULL();
+	}
+
+	PG_RETURN_TIMETZADT_P(result);
+}	/* timetz_zone() */
+
+/* timetz_izone()
+ * Encode time with time zone type with specified time interval as time zone.
+ */
+Datum
+timetz_izone(PG_FUNCTION_ARGS)
+{
+	Interval   *zone = PG_GETARG_INTERVAL_P(0);
+	TimeTzADT  *time = PG_GETARG_TIMETZADT_P(1);
+	TimeTzADT  *result;
+	TimeADT		time1;
+	int			tz;
+
+	if (zone->month != 0)
+		elog(ERROR, "INTERVAL time zone '%s' not legal (month specified)",
+			 DatumGetCString(DirectFunctionCall1(interval_out,
+												 PointerGetDatum(zone))));
+
+	tz = -(zone->time);
+
+	result = (TimeTzADT *) palloc(sizeof(TimeTzADT));
+
+	time1 = time->time - time->zone + tz;
+	TMODULO(result->time, time1, 86400e0);
+	if (result->time < 0)
+		result->time += 86400;
+	result->zone = tz;
+
+	PG_RETURN_TIMETZADT_P(result);
+}	/* timetz_izone() */
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 7095f24de7313023f9210f7b5dc9cc3b36a58331..28ca77b64ea54c9c339b8da60b3f45142aea99a6 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.66 2001/07/10 01:41:47 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.67 2001/09/28 08:09:10 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -29,13 +29,13 @@
 #define ROUND_ALL 1
 
 static int DecodeNumber(int flen, char *field,
-			 int fmask, int *tmask,
-			 struct tm * tm, double *fsec, int *is2digits);
+						int fmask, int *tmask,
+						struct tm * tm, double *fsec, int *is2digits);
 static int DecodeNumberField(int len, char *str,
-				  int fmask, int *tmask,
-				  struct tm * tm, double *fsec, int *is2digits);
+							 int fmask, int *tmask,
+							 struct tm * tm, double *fsec, int *is2digits);
 static int DecodeTime(char *str, int fmask, int *tmask,
-		   struct tm * tm, double *fsec);
+					  struct tm * tm, double *fsec);
 static int	DecodeTimezone(char *str, int *tzp);
 static datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
 static int	DecodeDate(char *str, int fmask, int *tmask, struct tm * tm);
@@ -47,10 +47,10 @@ int			day_tab[2][13] = {
 	{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}};
 
 char	   *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
-"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL};
+						"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL};
 
 char	   *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
-"Thursday", "Friday", "Saturday", NULL};
+					  "Thursday", "Friday", "Saturday", NULL};
 
 
 /*****************************************************************************
@@ -71,7 +71,7 @@ char	   *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
  * the text field is not guaranteed to be NULL-terminated.
  */
 static datetkn datetktbl[] = {
-/*		text			token	lexval */
+/*	text, token, lexval */
 	{EARLY, RESERV, DTK_EARLY}, /* "-infinity" reserved for "early time" */
 	{"acsst", DTZ, 63},			/* Cent. Australia */
 	{"acst", TZ, 57},			/* Cent. Australia */
@@ -104,6 +104,7 @@ static datetkn datetktbl[] = {
 	{"cetdst", DTZ, 12},		/* Central European Dayl.Time */
 	{"cst", TZ, NEG(36)},		/* Central Standard Time */
 	{DCURRENT, RESERV, DTK_CURRENT},	/* "current" is always now */
+	{"d", UNITS, DAY},			/* "day of month" for ISO input */
 	{"dec", MONTH, 12},
 	{"december", MONTH, 12},
 	{"dnt", TZ, 6},				/* Dansk Normal Tid */
@@ -124,6 +125,7 @@ static datetkn datetktbl[] = {
 	{"fwt", DTZ, 12},			/* French Winter Time  */
 	{"gmt", TZ, 0},				/* Greenwish Mean Time */
 	{"gst", TZ, 60},			/* Guam Std Time, USSR Zone 9 */
+	{"h", UNITS, HOUR},			/* "hour" */
 	{"hdt", DTZ, NEG(54)},		/* Hawaii/Alaska */
 	{"hmt", DTZ, 18},			/* Hellas ? ? */
 	{"hst", TZ, NEG(60)},		/* Hawaii Std Time */
@@ -134,16 +136,19 @@ static datetkn datetktbl[] = {
 	/* "invalid" reserved for invalid time */
 	{"ist", TZ, 12},			/* Israel */
 	{"it", TZ, 21},				/* Iran Time */
+	{"j", UNITS, JULIAN},
 	{"jan", MONTH, 1},
 	{"january", MONTH, 1},
+	{"jd", UNITS, JULIAN},
 	{"jst", TZ, 54},			/* Japan Std Time,USSR Zone 8 */
 	{"jt", TZ, 45},				/* Java Time */
 	{"jul", MONTH, 7},
-	{"july", MONTH, 7},
+	{"julian", UNITS, JULIAN},
 	{"jun", MONTH, 6},
 	{"june", MONTH, 6},
 	{"kst", TZ, 54},			/* Korea Standard Time */
 	{"ligt", TZ, 60},			/* From Melbourne, Australia */
+	{"m", UNITS, MONTH},		/* "month" for ISO input */
 	{"mar", MONTH, 3},
 	{"march", MONTH, 3},
 	{"may", MONTH, 5},
@@ -153,6 +158,7 @@ static datetkn datetktbl[] = {
 	{"metdst", DTZ, 12},		/* Middle Europe Daylight Time */
 	{"mewt", TZ, 6},			/* Middle Europe Winter Time */
 	{"mez", TZ, 6},				/* Middle Europe Zone */
+	{"mm", UNITS, MINUTE},		/* "minute" for ISO input */
 	{"mon", DOW, 1},
 	{"monday", DOW, 1},
 	{"mst", TZ, NEG(42)},		/* Mountain Standard Time */
@@ -174,6 +180,7 @@ static datetkn datetktbl[] = {
 	{"pdt", DTZ, NEG(42)},		/* Pacific Daylight Time */
 	{"pm", AMPM, PM},
 	{"pst", TZ, NEG(48)},		/* Pacific Standard Time */
+	{"s", UNITS, SECOND},		/* "seconds" for ISO input */
 	{"sadt", DTZ, 63},			/* S. Australian Dayl. Time */
 	{"sast", TZ, 57},			/* South Australian Std Time */
 	{"sat", DOW, 6},
@@ -186,6 +193,7 @@ static datetkn datetktbl[] = {
 	{"sun", DOW, 0},
 	{"sunday", DOW, 0},
 	{"swt", TZ, 6},				/* Swedish Winter Time	*/
+	{"t", DTK_ISO_TIME, 0},		/* Filler for ISO time fields */
 	{"thu", DOW, 4},
 	{"thur", DOW, 4},
 	{"thurs", DOW, 4},
@@ -208,6 +216,7 @@ static datetkn datetktbl[] = {
 	{"wet", TZ, 0},				/* Western Europe */
 	{"wetdst", DTZ, 6},			/* Western Europe */
 	{"wst", TZ, 48},			/* West Australian Std Time */
+	{"y", UNITS, YEAR},			/* "year" for ISO input */
 	{"ydt", DTZ, NEG(48)},		/* Yukon Daylight Time */
 	{YESTERDAY, RESERV, DTK_YESTERDAY}, /* yesterday midnight */
 	{"yst", TZ, NEG(54)},		/* Yukon Standard Time */
@@ -222,7 +231,7 @@ static unsigned int szdatetktbl = sizeof datetktbl / sizeof datetktbl[0];
 
 /* Used for SET australian_timezones to override North American ones */
 static datetkn australian_datetktbl[] = {
-	{"cst", TZ, 63},			/* Australia Eastern Std Time */
+	{"cst", TZ, 63},			/* Australia Central Std Time */
 	{"est", TZ, 60},			/* Australia Eastern Std Time */
 	{"sat", TZ, 57},
 };
@@ -231,7 +240,7 @@ static unsigned int australian_szdatetktbl = sizeof australian_datetktbl /
 											 sizeof australian_datetktbl[0];
 
 static datetkn deltatktbl[] = {
-/*		text			token	lexval */
+/*	text, token, lexval */
 	{"@", IGNORE, 0},			/* postgres relative time prefix */
 	{DAGO, AGO, 0},				/* "ago" indicates negative time offset */
 	{"c", UNITS, DTK_CENTURY},	/* "century" relative time units */
@@ -329,7 +338,8 @@ datetkn    *deltacache[MAXDATEFIELDS] = {NULL};
  * Use the algorithm by Henry Fliegel, a former NASA/JPL colleague
  *	now at Aerospace Corp. (hi, Henry!)
  *
- * These routines will be used by other date/time packages - tgl 97/02/25
+ * These routines will be used by other date/time packages
+ * - thomas 97/02/25
  */
 
 int
@@ -413,6 +423,7 @@ ParseDateTime(char *timestr, char *lowstr,
 			if (*cp == ':')
 			{
 				ftype[nf] = DTK_TIME;
+				*lp++ = *cp++;
 				while (isdigit((unsigned char) *cp) ||
 					   (*cp == ':') || (*cp == '.'))
 					*lp++ = *cp++;
@@ -422,10 +433,20 @@ ParseDateTime(char *timestr, char *lowstr,
 			else if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
 			{
 				ftype[nf] = DTK_DATE;
-				while (isalnum((unsigned char) *cp) || (*cp == '-') ||
-					   (*cp == '/') || (*cp == '.'))
-					*lp++ = tolower((unsigned char) *cp++);
-
+				*lp++ = *cp++;
+				/* second field is all digits? then no embedded text month */
+				if (isdigit((unsigned char) *cp))
+				{
+					while (isdigit((unsigned char) *cp) || (*cp == '-') ||
+						   (*cp == '/') || (*cp == '.'))
+						*lp++ = *cp++;
+				}
+				else
+				{
+					while (isalnum((unsigned char) *cp) || (*cp == '-') ||
+						   (*cp == '/') || (*cp == '.'))
+						*lp++ = tolower((unsigned char) *cp++);
+				}
 			}
 
 			/*
@@ -539,7 +560,7 @@ ParseDateTime(char *timestr, char *lowstr,
  * Use the system-provided functions to get the current time zone
  *	if not specified in the input string.
  * If the date is outside the time_t system-supported time range,
- *	then assume GMT time zone. - tgl 97/05/27
+ *	then assume GMT time zone. - thomas 1997/05/27
  */
 int
 DecodeDateTime(char **field, int *ftype, int nf,
@@ -548,6 +569,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
 	int			fmask = 0,
 				tmask,
 				type;
+	int			ptype = 0;		/* "prefix type" for ISO y2001m02d04 format */
 	int			i;
 	int			flen,
 				val;
@@ -556,13 +578,16 @@ DecodeDateTime(char **field, int *ftype, int nf,
 	int			is2digits = FALSE;
 	int			bc = FALSE;
 
+	/* We'll insist on at least all of the date fields,
+	 * but initialize the remaining fields in case they are not
+	 * set later...
+	 */
 	*dtype = DTK_DATE;
 	tm->tm_hour = 0;
 	tm->tm_min = 0;
 	tm->tm_sec = 0;
 	*fsec = 0;
-	tm->tm_isdst = -1;			/* don't know daylight savings time status
-								 * apriori */
+	tm->tm_isdst = -1;	/* don't know daylight savings time status apriori */
 	if (tzp != NULL)
 		*tzp = 0;
 
@@ -571,13 +596,32 @@ DecodeDateTime(char **field, int *ftype, int nf,
 		switch (ftype[i])
 		{
 			case DTK_DATE:
+				/* Previous field was a label for "julian date"?
+				 * then this should be a julian date with fractional day...
+				 */
+				if (ptype == JULIAN)
+				{
+					char *cp;
+					double dt, date, time;
 
-				/*
-				 * Already have a date? Then this might be a POSIX time
-				 * zone with an embedded dash (e.g. "PST-3" == "EST") -
-				 * thomas 2000-03-15
+					dt = strtod(field[i], &cp);
+					if (*cp != '\0')
+						return -1;
+
+					time = dt * 86400;
+					TMODULO(time, date, 86400e0);
+					j2date((int) date, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+					dt2time(time, &tm->tm_hour, &tm->tm_min, fsec);
+
+					tmask = DTK_DATE_M | DTK_TIME_M;
+					*dtype = DTK_DATE;
+				}
+
+				/* Already have a date? Then this might be a POSIX time
+				 * zone with an embedded dash (e.g. "PST-3" == "EST")
+				 * - thomas 2000-03-15
 				 */
-				if ((fmask & DTK_DATE_M) == DTK_DATE_M)
+				else if ((fmask & DTK_DATE_M) == DTK_DATE_M)
 				{
 					if ((tzp == NULL)
 						|| (DecodePosixTimezone(field[i], tzp) != 0))
@@ -587,15 +631,16 @@ DecodeDateTime(char **field, int *ftype, int nf,
 					tmask = DTK_M(TZ);
 				}
 				else if (DecodeDate(field[i], fmask, &tmask, tm) != 0)
+				{
 					return -1;
+				}
 				break;
 
 			case DTK_TIME:
 				if (DecodeTime(field[i], fmask, &tmask, tm, fsec) != 0)
 					return -1;
 
-				/*
-				 * check upper limit on hours; other limits checked in
+				/* Check upper limit on hours; other limits checked in
 				 * DecodeTime()
 				 */
 				if (tm->tm_hour > 23)
@@ -618,7 +663,8 @@ DecodeDateTime(char **field, int *ftype, int nf,
 					 * PST)
 					 */
 					if ((i > 0) && ((fmask & DTK_M(TZ)) != 0)
-						&& (ftype[i - 1] == DTK_TZ) && (isalpha((unsigned char) *field[i - 1])))
+						&& (ftype[i - 1] == DTK_TZ)
+						&& (isalpha((unsigned char) *field[i - 1])))
 					{
 						*tzp -= tz;
 						tmask = 0;
@@ -634,21 +680,81 @@ DecodeDateTime(char **field, int *ftype, int nf,
 			case DTK_NUMBER:
 				flen = strlen(field[i]);
 
+				/* Was this an "ISO date" with embedded field labels?
+				 * An example is "y2001m02d04" - thomas 2001-02-04
+				 */
+				if (ptype != 0)
+				{
+					char *cp;
+					int val;
+
+					val = strtol(field[i], &cp, 10);
+					if (*cp != '\0')
+						return -1;
+
+					switch (ptype) {
+						case YEAR:
+							tm->tm_year = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case MONTH:
+							tm->tm_mon = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case DAY:
+							tm->tm_mday = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case HOUR:
+							tm->tm_hour = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case MINUTE:
+							tm->tm_min = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case SECOND:
+							tm->tm_sec = val;
+							tmask = DTK_M(ptype);
+							break;
+
+						case JULIAN:
+							/* previous field was a label for "julian date"?
+							 * then this is a julian day with no fractional part
+							 * (see DTK_DATE for cases involving fractional parts)
+							 */
+							j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+
+							tmask = DTK_DATE_M;
+							break;
+
+						default:
+							return -1;
+							break;
+					}
+
+					ptype = 0;
+					*dtype = DTK_DATE;
+				}
 				/*
 				 * long numeric string and either no date or no time read
 				 * yet? then interpret as a concatenated date or time...
 				 */
-				if ((flen > 4) && !((fmask & DTK_DATE_M) && (fmask & DTK_TIME_M)))
+				else if ((flen > 4) && !((fmask & DTK_DATE_M) && (fmask & DTK_TIME_M)))
 				{
 					if (DecodeNumberField(flen, field[i], fmask, &tmask, tm, fsec, &is2digits) != 0)
 						return -1;
 
 				}
 				/* otherwise it is a single date/time field... */
-				else
+				else if (DecodeNumber(flen, field[i], fmask, &tmask, tm, fsec, &is2digits) != 0)
 				{
-					if (DecodeNumber(flen, field[i], fmask, &tmask, tm, fsec, &is2digits) != 0)
-						return -1;
+					return -1;
 				}
 				break;
 
@@ -664,10 +770,15 @@ DecodeDateTime(char **field, int *ftype, int nf,
 					case RESERV:
 						switch (val)
 						{
+							case DTK_CURRENT:
 							case DTK_NOW:
 								tmask = (DTK_DATE_M | DTK_TIME_M | DTK_M(TZ));
 								*dtype = DTK_DATE;
+#if NOT_USED
 								GetCurrentTime(tm);
+#else
+								GetCurrentTimeUsec(tm, fsec);
+#endif
 								if (tzp != NULL)
 									*tzp = CTimeZone;
 								break;
@@ -786,6 +897,18 @@ DecodeDateTime(char **field, int *ftype, int nf,
 						tm->tm_wday = val;
 						break;
 
+					case UNITS:
+						ptype = val;
+						tmask = 0;
+						break;
+
+					case DTK_ISO_TIME:
+						if ((i < 1) || (i >= (nf-1))
+							|| (ftype[i-1] != DTK_DATE)
+							|| (ftype[i+1] != DTK_TIME))
+							return -1;
+						break;
+
 					default:
 						return -1;
 				}
@@ -1182,6 +1305,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
 				str++;
 		}
 
+		/* Just get rid of any non-digit, non-alpha characters... */
 		if (*str != '\0')
 			*str++ = '\0';
 		nf++;
@@ -1362,8 +1486,9 @@ DecodeNumber(int flen, char *str, int fmask,
 	/*
 	 * Enough digits to be unequivocal year? Used to test for 4 digits or
 	 * more, but we now test first for a three-digit doy so anything
-	 * bigger than two digits had better be an explicit year. - thomas
-	 * 1999-01-09 Back to requiring a 4 digit year. We accept a two digit
+	 * bigger than two digits had better be an explicit year.
+	 * - thomas 1999-01-09
+	 * Back to requiring a 4 digit year. We accept a two digit
 	 * year farther down. - thomas 2000-03-28
 	 */
 	else if (flen >= 4)
@@ -1613,7 +1738,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
 	datecache[field] = tp;
 	if (tp == NULL)
 	{
-		type = IGNORE;
+		type = UNKNOWN_FIELD;
 		*val = 0;
 	}
 	else
@@ -1747,10 +1872,11 @@ DecodeDateDelta(char **field, int *ftype, int nf, int *dtype, struct tm * tm, do
 			case DTK_NUMBER:
 				val = strtol(field[i], &cp, 10);
 
+				if (type == IGNORE)
+					type = DTK_SECOND;
+
 				if (*cp == '.')
 				{
-					if (type == IGNORE)
-						type = DTK_SECOND;
 					fval = strtod(cp, &cp);
 					if (*cp != '\0')
 						return -1;
@@ -1928,7 +2054,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
 	deltacache[field] = tp;
 	if (tp == NULL)
 	{
-		type = IGNORE;
+		type = UNKNOWN_FIELD;
 		*val = 0;
 	}
 	else
@@ -1985,8 +2111,8 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
 
 	switch (style)
 	{
-			/* compatible with ISO date formats */
 		case USE_ISO_DATES:
+			/* compatible with ISO date formats */
 			if (tm->tm_year > 0)
 				sprintf(str, "%04d-%02d-%02d",
 						tm->tm_year, tm->tm_mon, tm->tm_mday);
@@ -1995,8 +2121,8 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
 					  -(tm->tm_year - 1), tm->tm_mon, tm->tm_mday, "BC");
 			break;
 
-			/* compatible with Oracle/Ingres date formats */
 		case USE_SQL_DATES:
+			/* compatible with Oracle/Ingres date formats */
 			if (EuroDates)
 				sprintf(str, "%02d/%02d", tm->tm_mday, tm->tm_mon);
 			else
@@ -2007,8 +2133,8 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
 				sprintf((str + 5), "/%04d %s", -(tm->tm_year - 1), "BC");
 			break;
 
-			/* German-style date format */
 		case USE_GERMAN_DATES:
+			/* German-style date format */
 			sprintf(str, "%02d.%02d", tm->tm_mday, tm->tm_mon);
 			if (tm->tm_year > 0)
 				sprintf((str + 5), ".%04d", tm->tm_year);
@@ -2016,9 +2142,9 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
 				sprintf((str + 5), ".%04d %s", -(tm->tm_year - 1), "BC");
 			break;
 
-			/* traditional date-only style for Postgres */
 		case USE_POSTGRES_DATES:
 		default:
+			/* traditional date-only style for Postgres */
 			if (EuroDates)
 				sprintf(str, "%02d-%02d", tm->tm_mday, tm->tm_mon);
 			else
diff --git a/src/backend/utils/adt/format_type.c b/src/backend/utils/adt/format_type.c
index 59b516556c9f22cf96488c0b506f8f58a7491c66..c80b5c429b616bdd5a8be5e1ad9bb6c7e835e3c1 100644
--- a/src/backend/utils/adt/format_type.c
+++ b/src/backend/utils/adt/format_type.c
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.15 2001/09/21 15:27:38 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.16 2001/09/28 08:09:10 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -205,6 +205,10 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
 			break;
 
 		case TIMESTAMPOID:
+			buf = pstrdup("timestamp without time zone");
+			break;
+
+		case TIMESTAMPTZOID:
 			buf = pstrdup("timestamp with time zone");
 			break;
 
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 532f3eb1d49513cad24bd9beef486677e5a7082b..d517eb68183f058ee89bbe71c65ecd0553ad75a1 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1,7 +1,7 @@
 /* -----------------------------------------------------------------------
  * formatting.c
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.40 2001/09/12 04:01:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.41 2001/09/28 08:09:11 thomas Exp $
  *
  *
  *	 Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
@@ -2753,6 +2753,30 @@ timestamp_to_char(PG_FUNCTION_ARGS)
 	Timestamp dt = PG_GETARG_TIMESTAMP(0);
 	text *fmt = PG_GETARG_TEXT_P(1), *res;
 	TmToChar tmtc;
+	int r = 0;
+
+	if ((VARSIZE(fmt) - VARHDRSZ) <=0 || TIMESTAMP_NOT_FINITE(dt))
+		PG_RETURN_NULL();
+
+	ZERO_tmtc(&tmtc);
+
+	r = timestamp2tm(dt, NULL, tmtcTm(&tmtc), &tmtcFsec(&tmtc), NULL);
+
+	if (r != 0)
+		elog(ERROR, "to_char(): Unable to convert timestamp to tm");
+
+	if (!(res=datetime_to_char_body(&tmtc, fmt)))
+		PG_RETURN_NULL();
+
+	PG_RETURN_TEXT_P(res);
+}
+
+Datum
+timestamptz_to_char(PG_FUNCTION_ARGS)
+{
+	TimestampTz dt = PG_GETARG_TIMESTAMP(0);
+	text *fmt = PG_GETARG_TEXT_P(1), *res;
+	TmToChar tmtc;
 	int tz, r = 0;
 
 	if ((VARSIZE(fmt) - VARHDRSZ) <=0 || TIMESTAMP_NOT_FINITE(dt))
@@ -2760,12 +2784,7 @@ timestamp_to_char(PG_FUNCTION_ARGS)
 
 	ZERO_tmtc(&tmtc);
 
-	if (TIMESTAMP_IS_EPOCH(dt))
-		r = timestamp2tm(SetTimestamp(dt), NULL, tmtcTm(&tmtc), &tmtcFsec(&tmtc), NULL);
-	else if (TIMESTAMP_IS_CURRENT(dt))
-		r = timestamp2tm(SetTimestamp(dt), &tz, tmtcTm(&tmtc), &tmtcFsec(&tmtc), &tmtcTzn(&tmtc));
-	else
-		r = timestamp2tm(dt, &tz, tmtcTm(&tmtc), &tmtcFsec(&tmtc), &tmtcTzn(&tmtc));
+	r = timestamp2tm(dt, &tz, tmtcTm(&tmtc), &tmtcFsec(&tmtc), &tmtcTzn(&tmtc));
 
 	if (r != 0)
 		elog(ERROR, "to_char(): Unable to convert timestamp to tm");
@@ -2805,7 +2824,7 @@ interval_to_char(PG_FUNCTION_ARGS)
 /* ---------------------
  * TO_TIMESTAMP()
  *
- * Make Timestamp from date_str which is formated at argument 'fmt'
+ * Make Timestamp from date_str which is formatted at argument 'fmt'
  * ( to_timestamp is reverse to_char() )
  * ---------------------
  */
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 0f8ed87e5ba31d40f2d1956e0a081ee5292932c4..ca8d728454ba4f66262101f9155c9cb1bb297bb6 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.85 2001/05/03 19:00:36 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.86 2001/09/28 08:09:11 thomas Exp $
  *
  * NOTES
  *
@@ -179,6 +179,84 @@ GetCurrentAbsoluteTime(void)
 }	/* GetCurrentAbsoluteTime() */
 
 
+/* GetCurrentAbsoluteTime()
+ * Get the current system time. Set timezone parameters if not specified elsewhere.
+ * Define HasTZSet to allow clients to specify the default timezone.
+ *
+ * Returns the number of seconds since epoch (January 1 1970 GMT)
+ */
+AbsoluteTime
+GetCurrentAbsoluteTimeUsec(int *usec)
+{
+	time_t now;
+	struct timeval tp;
+//	struct timezone tpz;
+#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
+	struct tm  *tm;
+#else
+	struct timeb tb;			/* the old V7-ism */
+#endif
+
+	gettimeofday(&tp, NULL);
+
+	now = tp.tv_sec;
+	*usec = tp.tv_usec;
+
+#ifdef NOT_USED
+#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
+	now = time(NULL);
+#else
+	ftime(&tb);
+	now = tb.time;
+#endif
+#endif
+
+	if (!HasCTZSet)
+	{
+#if defined(HAVE_TM_ZONE)
+		tm = localtime(&now);
+
+		CTimeZone = -tm->tm_gmtoff;		/* tm_gmtoff is Sun/DEC-ism */
+		CDayLight = (tm->tm_isdst > 0);
+
+#ifdef NOT_USED
+
+		/*
+		 * XXX is there a better way to get local timezone string w/o
+		 * tzname? - tgl 97/03/18
+		 */
+		strftime(CTZName, MAXTZLEN, "%Z", tm);
+#endif
+
+		/*
+		 * XXX FreeBSD man pages indicate that this should work - thomas
+		 * 1998-12-12
+		 */
+		strcpy(CTZName, tm->tm_zone);
+
+#elif defined(HAVE_INT_TIMEZONE)
+		tm = localtime(&now);
+
+		CDayLight = tm->tm_isdst;
+		CTimeZone = ((tm->tm_isdst > 0) ? (TIMEZONE_GLOBAL - 3600) : TIMEZONE_GLOBAL);
+		strcpy(CTZName, tzname[tm->tm_isdst]);
+#else							/* neither HAVE_TM_ZONE nor
+								 * HAVE_INT_TIMEZONE */
+		CTimeZone = tb.timezone * 60;
+		CDayLight = (tb.dstflag != 0);
+
+		/*
+		 * XXX does this work to get the local timezone string in V7? -
+		 * tgl 97/03/18
+		 */
+		strftime(CTZName, MAXTZLEN, "%Z", localtime(&now));
+#endif
+	};
+
+	return (AbsoluteTime) now;
+}	/* GetCurrentAbsoluteTime() */
+
+
 void
 GetCurrentTime(struct tm * tm)
 {
@@ -190,6 +268,19 @@ GetCurrentTime(struct tm * tm)
 }	/* GetCurrentTime() */
 
 
+void
+GetCurrentTimeUsec(struct tm *tm, double *fsec)
+{
+	int			tz;
+	int			usec;
+
+	abstime2tm(GetCurrentTransactionStartTimeUsec(&usec), &tz, tm, NULL);
+	*fsec = usec * 1.0e-6;
+
+	return;
+}	/* GetCurrentTimeUsec() */
+
+
 void
 abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
 {
@@ -357,11 +448,9 @@ nabstimein(PG_FUNCTION_ARGS)
 			break;
 
 		case DTK_EPOCH:
-			result = EPOCH_ABSTIME;
-			break;
-
-		case DTK_CURRENT:
-			result = CURRENT_ABSTIME;
+			/* Don't bother retaining this as a reserved value,
+			 * but instead just set to the actual epoch time (1970-01-01) */
+			result = 0;
 			break;
 
 		case DTK_LATE:
@@ -404,15 +493,12 @@ nabstimeout(PG_FUNCTION_ARGS)
 
 	switch (time)
 	{
-		case EPOCH_ABSTIME:
-			strcpy(buf, EPOCH);
-			break;
+		/* Note that timestamp no longer supports 'invalid'.
+		 * Retain 'invalid' for abstime for now, but dump it someday.
+		 */
 		case INVALID_ABSTIME:
 			strcpy(buf, INVALID);
 			break;
-		case CURRENT_ABSTIME:
-			strcpy(buf, DCURRENT);
-			break;
 		case NOEND_ABSTIME:
 			strcpy(buf, LATE);
 			break;
@@ -449,37 +535,37 @@ abstime_finite(PG_FUNCTION_ARGS)
 static int
 abstime_cmp_internal(AbsoluteTime a, AbsoluteTime b)
 {
-	/*
-	 * We consider all INVALIDs to be equal and larger than any non-INVALID.
-	 * This is somewhat arbitrary; the important thing is to have a
-	 * consistent sort order.
-	 */
+/*
+ * We consider all INVALIDs to be equal and larger than any non-INVALID.
+ * This is somewhat arbitrary; the important thing is to have a
+ * consistent sort order.
+ */
 	if (a == INVALID_ABSTIME)
 	{
-		if (b == INVALID_ABSTIME)
-			return 0;			/* INVALID = INVALID */
-		else
-			return 1;			/* INVALID > non-INVALID */
-	}
-	else if (b == INVALID_ABSTIME)
-	{
-		return -1;				/* non-INVALID < INVALID */
+        if (b == INVALID_ABSTIME)
+			return 0;	/* INVALID = INVALID */
+        else
+			return 1;	/* INVALID > non-INVALID */
 	}
+
+	if (b == INVALID_ABSTIME)
+        return -1;		/* non-INVALID < INVALID */
+
+#if 0
+/* CURRENT is no longer stored internally... */
+	/* XXX this is broken, should go away: */
+	if (a == CURRENT_ABSTIME)
+		a = GetCurrentTransactionStartTime();
+	if (b == CURRENT_ABSTIME)
+		b = GetCurrentTransactionStartTime();
+#endif
+
+	if (a > b)
+		return 1;
+	else if (a == b)
+		return 0;
 	else
-	{
-		/* XXX this is broken, should go away: */
-		if (a == CURRENT_ABSTIME)
-			a = GetCurrentTransactionStartTime();
-		if (b == CURRENT_ABSTIME)
-			b = GetCurrentTransactionStartTime();
-
-		if (a > b)
-			return 1;
-		else if (a == b)
-			return 0;
-		else
-			return -1;
-	}
+		return -1;
 }
 
 Datum
@@ -546,7 +632,7 @@ btabstimecmp(PG_FUNCTION_ARGS)
 }
 
 
-/* datetime_abstime()
+/* timestamp_abstime()
  * Convert timestamp to abstime.
  */
 Datum
@@ -555,26 +641,23 @@ timestamp_abstime(PG_FUNCTION_ARGS)
 	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
 	AbsoluteTime result;
 	double		fsec;
+	int			tz;
 	struct tm	tt,
 			   *tm = &tt;
 
-	if (TIMESTAMP_IS_INVALID(timestamp))
-		result = INVALID_ABSTIME;
-	else if (TIMESTAMP_IS_NOBEGIN(timestamp))
+	if (TIMESTAMP_IS_NOBEGIN(timestamp))
 		result = NOSTART_ABSTIME;
 	else if (TIMESTAMP_IS_NOEND(timestamp))
 		result = NOEND_ABSTIME;
+	else if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) == 0)
+	{
+		tz = DetermineLocalTimeZone(tm);
+		result = tm2abstime(tm, tz);
+	}
 	else
 	{
-		if (TIMESTAMP_IS_RELATIVE(timestamp))
-		{
-			timestamp2tm(SetTimestamp(timestamp), NULL, tm, &fsec, NULL);
-			result = tm2abstime(tm, 0);
-		}
-		else if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) == 0)
-			result = tm2abstime(tm, 0);
-		else
-			result = INVALID_ABSTIME;
+		elog(ERROR, "Unable to convert timestamp to abstime");
+		result = INVALID_ABSTIME;
 	}
 
 	PG_RETURN_ABSOLUTETIME(result);
@@ -588,11 +671,16 @@ abstime_timestamp(PG_FUNCTION_ARGS)
 {
 	AbsoluteTime abstime = PG_GETARG_ABSOLUTETIME(0);
 	Timestamp	result;
+	struct tm	tt,
+			   *tm = &tt;
+	int			tz;
+	char		tzn[MAXTZLEN];
 
 	switch (abstime)
 	{
 		case INVALID_ABSTIME:
-			TIMESTAMP_INVALID(result);
+			elog(ERROR, "Unable to convert abstime 'invalid' to timestamp");
+			TIMESTAMP_NOBEGIN(result);
 			break;
 
 		case NOSTART_ABSTIME:
@@ -603,12 +691,65 @@ abstime_timestamp(PG_FUNCTION_ARGS)
 			TIMESTAMP_NOEND(result);
 			break;
 
-		case EPOCH_ABSTIME:
-			TIMESTAMP_EPOCH(result);
+		default:
+			abstime2tm(abstime, &tz, tm, tzn);
+			result = abstime + ((date2j(1970, 1, 1) - date2j(2000, 1, 1)) * 86400) + tz;
 			break;
+	};
+
+	PG_RETURN_TIMESTAMP(result);
+}
+
+
+/* timestamptz_abstime()
+ * Convert timestamp with time zone to abstime.
+ */
+Datum
+timestamptz_abstime(PG_FUNCTION_ARGS)
+{
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
+	AbsoluteTime result;
+	double		fsec;
+	struct tm	tt,
+			   *tm = &tt;
 
-		case CURRENT_ABSTIME:
-			TIMESTAMP_CURRENT(result);
+	if (TIMESTAMP_IS_NOBEGIN(timestamp))
+		result = NOSTART_ABSTIME;
+	else if (TIMESTAMP_IS_NOEND(timestamp))
+		result = NOEND_ABSTIME;
+	else if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) == 0)
+		result = tm2abstime(tm, 0);
+	else
+	{
+		elog(ERROR, "Unable to convert timestamp to abstime");
+		result = INVALID_ABSTIME;
+	}
+
+	PG_RETURN_ABSOLUTETIME(result);
+}
+
+/* abstime_timestamptz()
+ * Convert abstime to timestamp.
+ */
+Datum
+abstime_timestamptz(PG_FUNCTION_ARGS)
+{
+	AbsoluteTime abstime = PG_GETARG_ABSOLUTETIME(0);
+	TimestampTz	result;
+
+	switch (abstime)
+	{
+		case INVALID_ABSTIME:
+			elog(ERROR, "Unable to convert abstime 'invalid' to timestamptz");
+			TIMESTAMP_NOBEGIN(result);
+			break;
+
+		case NOSTART_ABSTIME:
+			TIMESTAMP_NOBEGIN(result);
+			break;
+
+		case NOEND_ABSTIME:
+			TIMESTAMP_NOEND(result);
 			break;
 
 		default:
@@ -653,14 +794,15 @@ reltimein(PG_FUNCTION_ARGS)
 		case DTK_DELTA:
 			result = ((((tm->tm_hour * 60) + tm->tm_min) * 60) + tm->tm_sec);
 			result += (((tm->tm_year * 365) + (tm->tm_mon * 30) + tm->tm_mday) * (24 * 60 * 60));
-			PG_RETURN_RELATIVETIME(result);
+			break;
 
 		default:
-			PG_RETURN_RELATIVETIME(INVALID_RELTIME);
+			elog(ERROR, "Bad reltime (internal coding error) '%s'", str);
+			result = INVALID_RELTIME;
+			break;
 	}
 
-	elog(ERROR, "Bad reltime (internal coding error) '%s'", str);
-	PG_RETURN_RELATIVETIME(INVALID_RELTIME);
+	PG_RETURN_RELATIVETIME(result);
 }
 
 
@@ -676,13 +818,8 @@ reltimeout(PG_FUNCTION_ARGS)
 			   *tm = &tt;
 	char		buf[MAXDATELEN + 1];
 
-	if (time == INVALID_RELTIME)
-		strcpy(buf, INVALID_RELTIME_STR);
-	else
-	{
-		reltime2tm(time, tm);
-		EncodeTimeSpan(tm, 0, DateStyle, buf);
-	}
+	reltime2tm(time, tm);
+	EncodeTimeSpan(tm, 0, DateStyle, buf);
 
 	result = pstrdup(buf);
 	PG_RETURN_CSTRING(result);
@@ -702,44 +839,6 @@ reltime2tm(RelativeTime time, struct tm * tm)
 	return;
 }	/* reltime2tm() */
 
-#ifdef NOT_USED
-int
-dummyfunc()
-{
-	char	   *timestring;
-	long		quantity;
-	int			i;
-	int			unitnr;
-
-	timestring = (char *) palloc(Max(strlen(INVALID_RELTIME_STR),
-									 UNITMAXLEN) + 1);
-	if (timevalue == INVALID_RELTIME)
-	{
-		strcpy(timestring, INVALID_RELTIME_STR);
-		return timestring;
-	}
-
-	if (timevalue == 0)
-		i = 1;					/* unit = 'seconds' */
-	else
-		for (i = 12; i >= 0; i = i - 2)
-			if ((timevalue % sec_tab[i]) == 0)
-				break;			/* appropriate unit found */
-	unitnr = i;
-	quantity = (timevalue / sec_tab[unitnr]);
-	if (quantity > 1 || quantity < -1)
-		unitnr++;				/* adjust index for PLURAL of unit */
-	if (quantity >= 0)
-		sprintf(timestring, "%c %lu %s", RELTIME_LABEL,
-				quantity, unit_tab[unitnr]);
-	else
-		sprintf(timestring, "%c %lu %s %s", RELTIME_LABEL,
-				(quantity * -1), unit_tab[unitnr], RELTIME_PAST);
-	return timestring;
-}
-
-#endif
-
 
 /*
  *		tintervalin		- converts an interval string to internal format
@@ -749,26 +848,25 @@ tintervalin(PG_FUNCTION_ARGS)
 {
 	char	   *intervalstr = PG_GETARG_CSTRING(0);
 	TimeInterval interval;
-	int			error;
 	AbsoluteTime i_start,
 				i_end,
 				t1,
 				t2;
 
 	interval = (TimeInterval) palloc(sizeof(TimeIntervalData));
-	error = istinterval(intervalstr, &t1, &t2);
-	if (error == 0)
-		interval->status = T_INTERVAL_INVAL;
+	if (istinterval(intervalstr, &t1, &t2) == 0)
+		elog(ERROR, "Unable to decode tinterval '%s'", intervalstr);
+
 	if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
-		interval->status = T_INTERVAL_INVAL;	/* undefined  */
+        interval->status = T_INTERVAL_INVAL;    /* undefined  */
 	else
-	{
-		i_start = ABSTIMEMIN(t1, t2);
-		i_end = ABSTIMEMAX(t1, t2);
-		interval->data[0] = i_start;
-		interval->data[1] = i_end;
 		interval->status = T_INTERVAL_VALID;
-	}
+
+	i_start = ABSTIMEMIN(t1, t2);
+	i_end = ABSTIMEMAX(t1, t2);
+	interval->data[0] = i_start;
+	interval->data[1] = i_end;
+
 	PG_RETURN_TIMEINTERVAL(interval);
 }
 
@@ -818,30 +916,28 @@ interval_reltime(PG_FUNCTION_ARGS)
 				month;
 	double		span;
 
-	if (INTERVAL_IS_INVALID(*interval))
-		time = INVALID_RELTIME;
+	if (interval->month == 0)
+	{
+		year = 0;
+		month = 0;
+	}
+	else if (abs(interval->month) >= 12)
+	{
+		year = (interval->month / 12);
+		month = (interval->month % 12);
+	}
 	else
 	{
-		if (interval->month == 0)
-		{
-			year = 0;
-			month = 0;
-		}
-		else if (abs(interval->month) >= 12)
-		{
-			year = (interval->month / 12);
-			month = (interval->month % 12);
-		}
-		else
-		{
-			year = 0;
-			month = interval->month;
-		}
+		year = 0;
+		month = interval->month;
+	}
 
-		span = (((((double) 365 * year) + ((double) 30 * month)) * 86400) + interval->time);
+	span = (((((double) 365 * year) + ((double) 30 * month)) * 86400) + interval->time);
 
-		time = (((span > INT_MIN) && (span < INT_MAX)) ? span : INVALID_RELTIME);
-	}
+	if ((span < INT_MIN) || (span > INT_MAX))
+		time = INVALID_RELTIME;
+	else
+		time = span;
 
 	PG_RETURN_RELATIVETIME(time);
 }
@@ -860,7 +956,9 @@ reltime_interval(PG_FUNCTION_ARGS)
 	switch (reltime)
 	{
 		case INVALID_RELTIME:
-			INTERVAL_INVALID(*result);
+			elog(ERROR, "Unable to convert reltime 'invalid' to interval");
+			result->time = 0;
+			result->month = 0;
 			break;
 
 		default:
@@ -884,11 +982,12 @@ mktinterval(PG_FUNCTION_ARGS)
 {
 	AbsoluteTime t1 = PG_GETARG_ABSOLUTETIME(0);
 	AbsoluteTime t2 = PG_GETARG_ABSOLUTETIME(1);
-	AbsoluteTime tstart = ABSTIMEMIN(t1, t2),
-				tend = ABSTIMEMAX(t1, t2);
+	AbsoluteTime tstart = ABSTIMEMIN(t1, t2);
+	AbsoluteTime tend = ABSTIMEMAX(t1, t2);
 	TimeInterval interval;
 
 	interval = (TimeInterval) palloc(sizeof(TimeIntervalData));
+
 	if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME)
 		interval->status = T_INTERVAL_INVAL;
 	else
@@ -909,7 +1008,7 @@ mktinterval(PG_FUNCTION_ARGS)
  */
 
 /*
- *		timepl			- returns the value of (abstime t1 + relime t2)
+ *		timepl			- returns the value of (abstime t1 + reltime t2)
  */
 Datum
 timepl(PG_FUNCTION_ARGS)
@@ -917,8 +1016,10 @@ timepl(PG_FUNCTION_ARGS)
 	AbsoluteTime t1 = PG_GETARG_ABSOLUTETIME(0);
 	RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
 
+#if 0
 	if (t1 == CURRENT_ABSTIME)
 		t1 = GetCurrentTransactionStartTime();
+#endif
 
 	if (AbsoluteTimeIsReal(t1) &&
 		RelativeTimeIsValid(t2) &&
@@ -939,8 +1040,10 @@ timemi(PG_FUNCTION_ARGS)
 	AbsoluteTime t1 = PG_GETARG_ABSOLUTETIME(0);
 	RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
 
+#if 0
 	if (t1 == CURRENT_ABSTIME)
 		t1 = GetCurrentTransactionStartTime();
+#endif
 
 	if (AbsoluteTimeIsReal(t1) &&
 		RelativeTimeIsValid(t2) &&
@@ -952,27 +1055,6 @@ timemi(PG_FUNCTION_ARGS)
 }
 
 
-/*
- *		abstimemi		- returns the value of (abstime t1 - abstime t2)
- *
- * This is not exported, so it's not been made fmgr-compatible.
- */
-static RelativeTime
-abstimemi(AbsoluteTime t1, AbsoluteTime t2)
-{
-	if (t1 == CURRENT_ABSTIME)
-		t1 = GetCurrentTransactionStartTime();
-	if (t2 == CURRENT_ABSTIME)
-		t2 = GetCurrentTransactionStartTime();
-
-	if (AbsoluteTimeIsReal(t1) &&
-		AbsoluteTimeIsReal(t2))
-		return t1 - t2;
-
-	return INVALID_RELTIME;
-}
-
-
 /*
  *		intinterval		- returns true iff absolute date is in the interval
  */
@@ -1002,13 +1084,20 @@ Datum
 tintervalrel(PG_FUNCTION_ARGS)
 {
 	TimeInterval interval = PG_GETARG_TIMEINTERVAL(0);
+	AbsoluteTime t1 = interval->data[0];
+	AbsoluteTime t2 = interval->data[1];
 
 	if (interval->status != T_INTERVAL_VALID)
 		PG_RETURN_RELATIVETIME(INVALID_RELTIME);
 
-	PG_RETURN_RELATIVETIME(abstimemi(interval->data[1], interval->data[0]));
+	if (AbsoluteTimeIsReal(t1) &&
+		AbsoluteTimeIsReal(t2))
+		PG_RETURN_RELATIVETIME(t2 - t1);
+
+	PG_RETURN_RELATIVETIME(INVALID_RELTIME);
 }
 
+
 /*
  *		timenow			- returns  time "now", internal format
  *
@@ -1021,6 +1110,7 @@ timenow(PG_FUNCTION_ARGS)
 
 	if (time(&sec) < 0)
 		PG_RETURN_ABSOLUTETIME(INVALID_ABSTIME);
+
 	PG_RETURN_ABSOLUTETIME((AbsoluteTime) sec);
 }
 
@@ -1113,11 +1203,11 @@ tintervalsame(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 
 	if (DatumGetBool(DirectFunctionCall2(abstimeeq,
-									   AbsoluteTimeGetDatum(i1->data[0]),
-								   AbsoluteTimeGetDatum(i2->data[0]))) &&
+										 AbsoluteTimeGetDatum(i1->data[0]),
+										 AbsoluteTimeGetDatum(i2->data[0]))) &&
 		DatumGetBool(DirectFunctionCall2(abstimeeq,
-									   AbsoluteTimeGetDatum(i1->data[1]),
-									 AbsoluteTimeGetDatum(i2->data[1]))))
+										 AbsoluteTimeGetDatum(i1->data[1]),
+										 AbsoluteTimeGetDatum(i2->data[1]))))
 		PG_RETURN_BOOL(true);
 	PG_RETURN_BOOL(false);
 }
@@ -1133,9 +1223,9 @@ tintervaleq(PG_FUNCTION_ARGS)
 	TimeInterval i1 = PG_GETARG_TIMEINTERVAL(0);
 	TimeInterval i2 = PG_GETARG_TIMEINTERVAL(1);
 	AbsoluteTime t10,
-				t11,
-				t20,
-				t21;
+				 t11,
+				 t20,
+				 t21;
 
 	if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
 		PG_RETURN_BOOL(false);
@@ -1145,19 +1235,10 @@ tintervaleq(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) == (t21 - t20));
 }
 
@@ -1167,9 +1248,9 @@ tintervalne(PG_FUNCTION_ARGS)
 	TimeInterval i1 = PG_GETARG_TIMEINTERVAL(0);
 	TimeInterval i2 = PG_GETARG_TIMEINTERVAL(1);
 	AbsoluteTime t10,
-				t11,
-				t20,
-				t21;
+				 t11,
+				 t20,
+				 t21;
 
 	if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
 		PG_RETURN_BOOL(false);
@@ -1179,19 +1260,10 @@ tintervalne(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) != (t21 - t20));
 }
 
@@ -1201,9 +1273,9 @@ tintervallt(PG_FUNCTION_ARGS)
 	TimeInterval i1 = PG_GETARG_TIMEINTERVAL(0);
 	TimeInterval i2 = PG_GETARG_TIMEINTERVAL(1);
 	AbsoluteTime t10,
-				t11,
-				t20,
-				t21;
+				 t11,
+				 t20,
+				 t21;
 
 	if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
 		PG_RETURN_BOOL(false);
@@ -1213,19 +1285,10 @@ tintervallt(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) < (t21 - t20));
 }
 
@@ -1235,9 +1298,9 @@ tintervalle(PG_FUNCTION_ARGS)
 	TimeInterval i1 = PG_GETARG_TIMEINTERVAL(0);
 	TimeInterval i2 = PG_GETARG_TIMEINTERVAL(1);
 	AbsoluteTime t10,
-				t11,
-				t20,
-				t21;
+				 t11,
+				 t20,
+				 t21;
 
 	if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
 		PG_RETURN_BOOL(false);
@@ -1247,19 +1310,10 @@ tintervalle(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) <= (t21 - t20));
 }
 
@@ -1281,19 +1335,10 @@ tintervalgt(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) > (t21 - t20));
 }
 
@@ -1315,19 +1360,10 @@ tintervalge(PG_FUNCTION_ARGS)
 	t20 = i2->data[0];
 	t21 = i2->data[1];
 
-	if ((t10 == INVALID_ABSTIME) || (t20 == INVALID_ABSTIME)
+	if ((t10 == INVALID_ABSTIME) || (t11 == INVALID_ABSTIME)
 		|| (t20 == INVALID_ABSTIME) || (t21 == INVALID_ABSTIME))
 		PG_RETURN_BOOL(false);
 
-	if (t10 == CURRENT_ABSTIME)
-		t10 = GetCurrentTransactionStartTime();
-	if (t11 == CURRENT_ABSTIME)
-		t11 = GetCurrentTransactionStartTime();
-	if (t20 == CURRENT_ABSTIME)
-		t20 = GetCurrentTransactionStartTime();
-	if (t21 == CURRENT_ABSTIME)
-		t21 = GetCurrentTransactionStartTime();
-
 	PG_RETURN_BOOL((t11 - t10) >= (t21 - t20));
 }
 
@@ -1356,8 +1392,8 @@ tintervalleneq(PG_FUNCTION_ARGS)
 	if (i->status == T_INTERVAL_INVAL || t == INVALID_RELTIME)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
-											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt == t);
+												  TimeIntervalGetDatum(i)));
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt == t));
 }
 
 Datum
@@ -1371,7 +1407,7 @@ tintervallenne(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
 											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt != t);
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt != t));
 }
 
 Datum
@@ -1385,7 +1421,7 @@ tintervallenlt(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
 											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt < t);
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt < t));
 }
 
 Datum
@@ -1399,7 +1435,7 @@ tintervallengt(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
 											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt > t);
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt > t));
 }
 
 Datum
@@ -1413,7 +1449,7 @@ tintervallenle(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
 											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt <= t);
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt <= t));
 }
 
 Datum
@@ -1427,7 +1463,7 @@ tintervallenge(PG_FUNCTION_ARGS)
 		PG_RETURN_BOOL(false);
 	rt = DatumGetRelativeTime(DirectFunctionCall1(tintervalrel,
 											   TimeIntervalGetDatum(i)));
-	PG_RETURN_BOOL(rt != INVALID_RELTIME && rt >= t);
+	PG_RETURN_BOOL((rt != INVALID_RELTIME) && (rt >= t));
 }
 
 /*
@@ -1463,11 +1499,11 @@ tintervalov(PG_FUNCTION_ARGS)
 	if (i1->status == T_INTERVAL_INVAL || i2->status == T_INTERVAL_INVAL)
 		PG_RETURN_BOOL(false);
 	if (DatumGetBool(DirectFunctionCall2(abstimelt,
-									   AbsoluteTimeGetDatum(i1->data[1]),
-								   AbsoluteTimeGetDatum(i2->data[0]))) ||
+										 AbsoluteTimeGetDatum(i1->data[1]),
+										 AbsoluteTimeGetDatum(i2->data[0]))) ||
 		DatumGetBool(DirectFunctionCall2(abstimegt,
-									   AbsoluteTimeGetDatum(i1->data[0]),
-									 AbsoluteTimeGetDatum(i2->data[1]))))
+										 AbsoluteTimeGetDatum(i1->data[0]),
+										 AbsoluteTimeGetDatum(i2->data[1]))))
 		PG_RETURN_BOOL(false);
 	PG_RETURN_BOOL(true);
 }
@@ -1503,222 +1539,6 @@ tintervalend(PG_FUNCTION_ARGS)
  *	 PRIVATE ROUTINES														 *
  *****************************************************************************/
 
-#ifdef NOT_USED
-/*
- *		isreltime		- returns 1, iff datestring is of type reltime
- *								  2, iff datestring is 'invalid time' identifier
- *								  0, iff datestring contains a syntax error
- *		VALID time	less or equal +/-  `@ 68 years'
- *
- */
-int
-isreltime(char *str)
-{
-	struct tm	tt,
-			   *tm = &tt;
-	double		fsec;
-	int			dtype;
-	char	   *field[MAXDATEFIELDS];
-	int			nf,
-				ftype[MAXDATEFIELDS];
-	char		lowstr[MAXDATELEN + 1];
-
-	if (!PointerIsValid(str))
-		return 0;
-
-	if (strlen(str) > MAXDATELEN)
-		return 0;
-
-	if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
-		|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
-		return 0;
-
-	switch (dtype)
-	{
-		case (DTK_DELTA):
-			return (abs(tm->tm_year) <= 68) ? 1 : 0;
-			break;
-
-		case (DTK_INVALID):
-			return 2;
-			break;
-
-		default:
-			return 0;
-			break;
-	}
-
-	return 0;
-}	/* isreltime() */
-
-#endif
-
-#ifdef NOT_USED
-int
-dummyfunc()
-{
-	char	   *p;
-	char		c;
-	int			i;
-	char		unit[UNITMAXLEN];
-	char		direction[DIRMAXLEN];
-	int			localSign;
-	int			localUnitNumber;
-	long		localQuantity;
-
-	if (!PointerIsValid(sign))
-		sign = &localSign;
-
-	if (!PointerIsValid(unitnr))
-		unitnr = &localUnitNumber;
-
-	if (!PointerIsValid(quantity))
-		quantity = &localQuantity;
-
-	unit[0] = '\0';
-	direction[0] = '\0';
-	p = timestring;
-	/* skip leading blanks */
-	while ((c = *p) != '\0')
-	{
-		if (c != ' ')
-			break;
-		p++;
-	}
-
-	/* Test whether 'invalid time' identifier or not */
-	if (!strncmp(INVALID_RELTIME_STR, p, strlen(INVALID_RELTIME_STR) + 1))
-		return 2;				/* correct 'invalid time' identifier found */
-
-	/* handle label of relative time */
-	if (c != RELTIME_LABEL)
-		return 0;				/* syntax error */
-	c = *++p;
-	if (c != ' ')
-		return 0;				/* syntax error */
-	p++;
-	/* handle the quantity */
-	*quantity = 0;
-	for (;;)
-	{
-		c = *p;
-		if (isdigit((unsigned char) c))
-		{
-			*quantity = *quantity * 10 + (c - '0');
-			p++;
-		}
-		else
-		{
-			if (c == ' ')
-				break;			/* correct quantity found */
-			else
-				return 0;		/* syntax error */
-		}
-	}
-
-	/* handle unit */
-	p++;
-	i = 0;
-	for (;;)
-	{
-		c = *p;
-		if (c >= 'a' && c <= 'z' && i <= (UNITMAXLEN - 1))
-		{
-			unit[i] = c;
-			p++;
-			i++;
-		}
-		else
-		{
-			if ((c == ' ' || c == '\0')
-				&& correct_unit(unit, unitnr))
-				break;			/* correct unit found */
-			else
-				return 0;		/* syntax error */
-		}
-	}
-
-	/* handle optional direction */
-	if (c == ' ')
-		p++;
-	i = 0;
-	*sign = 1;
-	for (;;)
-	{
-		c = *p;
-		if (c >= 'a' && c <= 'z' && i <= (DIRMAXLEN - 1))
-		{
-			direction[i] = c;
-			p++;
-			i++;
-		}
-		else
-		{
-			if ((c == ' ' || c == '\0') && i == 0)
-			{
-				*sign = 1;
-				break;			/* no direction specified */
-			}
-			if ((c == ' ' || c == '\0') && i != 0)
-			{
-				direction[i] = '\0';
-				correct_dir(direction, sign);
-				break;			/* correct direction found */
-			}
-			else
-				return 0;		/* syntax error */
-		}
-	}
-
-	return 1;
-}
-
-/*
- *		correct_unit	- returns 1, iff unit is a correct unit description
- *
- *		output parameter:
- *				unptr: points to an integer which is the appropriate unit number
- *					   (see function isreltime())
- */
-static int
-correct_unit(char *unit, int *unptr)
-{
-	int			j = 0;
-
-	while (j < NUNITS)
-	{
-		if (strncmp(unit, unit_tab[j], strlen(unit_tab[j])) == 0)
-		{
-			*unptr = j;
-			return 1;
-		}
-		j++;
-	}
-	return 0;					/* invalid unit descriptor */
-}
-
-/*
- *		correct_dir		- returns 1, iff direction is a correct identifier
- *
- *		output parameter:
- *				signptr: points to -1 if dir corresponds to past tense
- *						 else  to 1
- */
-static int
-correct_dir(char *direction, int *signptr)
-{
-	*signptr = 1;
-	if (strncmp(RELTIME_PAST, direction, strlen(RELTIME_PAST) + 1) == 0)
-	{
-		*signptr = -1;
-		return 1;
-	}
-	else
-		return 0;				/* invalid direction descriptor */
-}
-
-#endif
-
 /*
  *		istinterval		- returns 1, iff i_string is a valid interval descr.
  *								  0, iff i_string is NOT a valid interval desc.
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 824faae152bf6e6a5e3f7054ebaa48097dd05b66..1bd42689659765e8085467e70dd75d9526683527 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.50 2001/09/06 03:22:42 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.51 2001/09/28 08:09:11 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -32,7 +32,7 @@
 static double time2t(const int hour, const int min, const double sec);
 static int	EncodeSpecialTimestamp(Timestamp dt, char *str);
 static Timestamp dt2local(Timestamp dt, int timezone);
-static void dt2time(Timestamp dt, int *hour, int *min, double *sec);
+
 
 /*****************************************************************************
  *	 USER I/O ROUTINES														 *
@@ -63,16 +63,12 @@ timestamp_in(PG_FUNCTION_ARGS)
 	switch (dtype)
 	{
 		case DTK_DATE:
-			if (tm2timestamp(tm, fsec, &tz, &result) != 0)
+			if (tm2timestamp(tm, fsec, NULL, &result) != 0)
 				elog(ERROR, "Timestamp out of range '%s'", str);
 			break;
 
 		case DTK_EPOCH:
-			TIMESTAMP_EPOCH(result);
-			break;
-
-		case DTK_CURRENT:
-			TIMESTAMP_CURRENT(result);
+			result = SetEpochTimestamp();
 			break;
 
 		case DTK_LATE:
@@ -84,12 +80,13 @@ timestamp_in(PG_FUNCTION_ARGS)
 			break;
 
 		case DTK_INVALID:
-			TIMESTAMP_INVALID(result);
+			elog(ERROR, "Timestamp '%s' no longer supported", str);
+			TIMESTAMP_NOEND(result);
 			break;
 
 		default:
-			elog(ERROR, "Internal coding error, can't input timestamp '%s'", str);
-			TIMESTAMP_INVALID(result);	/* keep compiler quiet */
+			elog(ERROR, "Timestamp '%s' not parsed; internal coding error", str);
+			TIMESTAMP_NOEND(result);
 	}
 
 	PG_RETURN_TIMESTAMP(result);
@@ -103,6 +100,86 @@ timestamp_out(PG_FUNCTION_ARGS)
 {
 	Timestamp	dt = PG_GETARG_TIMESTAMP(0);
 	char	   *result;
+	struct tm	tt,
+			   *tm = &tt;
+	double		fsec;
+	char	   *tzn = NULL;
+	char		buf[MAXDATELEN + 1];
+
+	if (TIMESTAMP_NOT_FINITE(dt))
+		EncodeSpecialTimestamp(dt, buf);
+	else if (timestamp2tm(dt, NULL, tm, &fsec, NULL) == 0)
+		EncodeDateTime(tm, fsec, NULL, &tzn, DateStyle, buf);
+	else
+		elog(ERROR, "Unable to format timestamp; internal coding error");
+
+	result = pstrdup(buf);
+	PG_RETURN_CSTRING(result);
+}
+
+
+/* timestamptz_in()
+ * Convert a string to internal form.
+ */
+Datum
+timestamptz_in(PG_FUNCTION_ARGS)
+{
+	char	   *str = PG_GETARG_CSTRING(0);
+	TimestampTz	result;
+	double		fsec;
+	struct tm	tt,
+			   *tm = &tt;
+	int			tz;
+	int			dtype;
+	int			nf;
+	char	   *field[MAXDATEFIELDS];
+	int			ftype[MAXDATEFIELDS];
+	char		lowstr[MAXDATELEN + 1];
+
+	if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
+	  || (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz) != 0))
+		elog(ERROR, "Bad timestamp external representation '%s'", str);
+
+	switch (dtype)
+	{
+		case DTK_DATE:
+			if (tm2timestamp(tm, fsec, &tz, &result) != 0)
+				elog(ERROR, "Timestamp out of range '%s'", str);
+			break;
+
+		case DTK_EPOCH:
+			result = SetEpochTimestamp();
+			break;
+
+		case DTK_LATE:
+			TIMESTAMP_NOEND(result);
+			break;
+
+		case DTK_EARLY:
+			TIMESTAMP_NOBEGIN(result);
+			break;
+
+		case DTK_INVALID:
+			elog(ERROR, "Timestamp with time zone '%s' no longer supported", str);
+			TIMESTAMP_NOEND(result);
+			break;
+
+		default:
+			elog(ERROR, "Timestamp with time zone '%s' not parsed; internal coding error", str);
+			TIMESTAMP_NOEND(result);
+	}
+
+	PG_RETURN_TIMESTAMPTZ(result);
+}
+
+/* timestamptz_out()
+ * Convert a timestamp to external form.
+ */
+Datum
+timestamptz_out(PG_FUNCTION_ARGS)
+{
+	TimestampTz	dt = PG_GETARG_TIMESTAMP(0);
+	char	   *result;
 	int			tz;
 	struct tm	tt,
 			   *tm = &tt;
@@ -110,12 +187,12 @@ timestamp_out(PG_FUNCTION_ARGS)
 	char	   *tzn;
 	char		buf[MAXDATELEN + 1];
 
-	if (TIMESTAMP_IS_RESERVED(dt))
+	if (TIMESTAMP_NOT_FINITE(dt))
 		EncodeSpecialTimestamp(dt, buf);
 	else if (timestamp2tm(dt, &tz, tm, &fsec, &tzn) == 0)
 		EncodeDateTime(tm, fsec, &tz, &tzn, DateStyle, buf);
 	else
-		EncodeSpecialTimestamp(DT_INVALID, buf);
+		elog(ERROR, "Unable to format timestamp with time zone; internal coding error");
 
 	result = pstrdup(buf);
 	PG_RETURN_CSTRING(result);
@@ -132,7 +209,7 @@ Datum
 interval_in(PG_FUNCTION_ARGS)
 {
 	char	   *str = PG_GETARG_CSTRING(0);
-	Interval   *span;
+	Interval   *result;
 	double		fsec;
 	struct tm	tt,
 			   *tm = &tt;
@@ -154,25 +231,24 @@ interval_in(PG_FUNCTION_ARGS)
 		|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
 		elog(ERROR, "Bad interval external representation '%s'", str);
 
-	span = (Interval *) palloc(sizeof(Interval));
+	result = (Interval *) palloc(sizeof(Interval));
 
 	switch (dtype)
 	{
 		case DTK_DELTA:
-			if (tm2interval(tm, fsec, span) != 0)
-			{
-#if NOT_USED
-				INTERVAL_INVALID(span);
-#endif
+			if (tm2interval(tm, fsec, result) != 0)
 				elog(ERROR, "Bad interval external representation '%s'", str);
-			}
+			break;
+
+		case DTK_INVALID:
+			elog(ERROR, "Interval '%s' no longer supported", str);
 			break;
 
 		default:
-			elog(ERROR, "Internal coding error, can't input interval '%s'", str);
+			elog(ERROR, "Interval '%s' not parsed; internal coding error", str);
 	}
 
-	PG_RETURN_INTERVAL_P(span);
+	PG_RETURN_INTERVAL_P(result);
 }
 
 /* interval_out()
@@ -189,10 +265,10 @@ interval_out(PG_FUNCTION_ARGS)
 	char		buf[MAXDATELEN + 1];
 
 	if (interval2tm(*span, tm, &fsec) != 0)
-		PG_RETURN_NULL();
+		elog(ERROR, "Unable to encode interval; internal coding error");
 
 	if (EncodeTimeSpan(tm, fsec, DateStyle, buf) != 0)
-		elog(ERROR, "Unable to format interval");
+		elog(ERROR, "Unable to format interval; internal coding error");
 
 	result = pstrdup(buf);
 	PG_RETURN_CSTRING(result);
@@ -205,40 +281,31 @@ interval_out(PG_FUNCTION_ARGS)
 static int
 EncodeSpecialTimestamp(Timestamp dt, char *str)
 {
-	if (TIMESTAMP_IS_RESERVED(dt))
-	{
-		if (TIMESTAMP_IS_INVALID(dt))
-			strcpy(str, INVALID);
-		else if (TIMESTAMP_IS_NOBEGIN(dt))
-			strcpy(str, EARLY);
-		else if (TIMESTAMP_IS_NOEND(dt))
-			strcpy(str, LATE);
-		else if (TIMESTAMP_IS_CURRENT(dt))
-			strcpy(str, DCURRENT);
-		else if (TIMESTAMP_IS_EPOCH(dt))
-			strcpy(str, EPOCH);
-		else
-			strcpy(str, INVALID);
-		return TRUE;
-	}
+	if (TIMESTAMP_IS_NOBEGIN(dt))
+		strcpy(str, EARLY);
+	else if (TIMESTAMP_IS_NOEND(dt))
+		strcpy(str, LATE);
+	else
+		return FALSE;
 
-	return FALSE;
+	return TRUE;
 }	/* EncodeSpecialTimestamp() */
 
 Datum
 now(PG_FUNCTION_ARGS)
 {
-	Timestamp	result;
+	TimestampTz	result;
 	AbsoluteTime sec;
+	int			usec;
 
-	sec = GetCurrentTransactionStartTime();
+	sec = GetCurrentTransactionStartTimeUsec(&usec);
 
-	result = (sec - ((date2j(2000, 1, 1) - date2j(1970, 1, 1)) * 86400));
+	result = (sec + (usec * 1.0e-6) - ((date2j(2000, 1, 1) - date2j(1970, 1, 1)) * 86400));
 
-	PG_RETURN_TIMESTAMP(result);
+	PG_RETURN_TIMESTAMPTZ(result);
 }
 
-static void
+void
 dt2time(Timestamp jd, int *hour, int *min, double *sec)
 {
 	double		time;
@@ -485,9 +552,7 @@ timestamp_finite(PG_FUNCTION_ARGS)
 Datum
 interval_finite(PG_FUNCTION_ARGS)
 {
-	Interval   *interval = PG_GETARG_INTERVAL_P(0);
-
-	PG_RETURN_BOOL(!INTERVAL_NOT_FINITE(*interval));
+	PG_RETURN_BOOL(true);
 }
 
 
@@ -495,7 +560,7 @@ interval_finite(PG_FUNCTION_ARGS)
  *	Relational operators for timestamp.
  *---------------------------------------------------------*/
 
-static void
+void
 GetEpochTime(struct tm * tm)
 {
 	struct tm  *t0;
@@ -518,24 +583,17 @@ GetEpochTime(struct tm * tm)
 }	/* GetEpochTime() */
 
 Timestamp
-SetTimestamp(Timestamp dt)
+SetEpochTimestamp(void)
 {
-	struct tm	tt;
+	Timestamp	dt;
+	struct tm	tt,
+			   *tm = &tt;
 
-	if (TIMESTAMP_IS_CURRENT(dt))
-	{
-		GetCurrentTime(&tt);
-		tm2timestamp(&tt, 0, NULL, &dt);
-		dt = dt2local(dt, -CTimeZone);
-	}
-	else
-	{							/* if (TIMESTAMP_IS_EPOCH(dt1)) */
-		GetEpochTime(&tt);
-		tm2timestamp(&tt, 0, NULL, &dt);
-	}
+	GetEpochTime(tm);
+	tm2timestamp(tm, 0, NULL, &dt);
 
 	return dt;
-}	/* SetTimestamp() */
+}	/* SetEpochTimestamp() */
 
 /*
  *		timestamp_relop - is timestamp1 relop timestamp2
@@ -545,19 +603,7 @@ SetTimestamp(Timestamp dt)
 static int
 timestamp_cmp_internal(Timestamp dt1, Timestamp dt2)
 {
-	if (TIMESTAMP_IS_INVALID(dt1))
-		return (TIMESTAMP_IS_INVALID(dt2) ? 0 : 1);
-	else if (TIMESTAMP_IS_INVALID(dt2))
-		return -1;
-	else
-	{
-		if (TIMESTAMP_IS_RELATIVE(dt1))
-			dt1 = SetTimestamp(dt1);
-		if (TIMESTAMP_IS_RELATIVE(dt2))
-			dt2 = SetTimestamp(dt2);
-
-		return ((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0));
-	}
+	return ((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0));
 }
 
 Datum
@@ -632,24 +678,17 @@ timestamp_cmp(PG_FUNCTION_ARGS)
 static int
 interval_cmp_internal(Interval *interval1, Interval *interval2)
 {
-	if (INTERVAL_IS_INVALID(*interval1))
-		return (INTERVAL_IS_INVALID(*interval2) ? 0 : 1);
-	else if (INTERVAL_IS_INVALID(*interval2))
-		return -1;
-	else
-	{
-		double		span1,
-					span2;
+	double		span1,
+				span2;
 
-		span1 = interval1->time;
-		if (interval1->month != 0)
-			span1 += (interval1->month * (30.0 * 86400));
-		span2 = interval2->time;
-		if (interval2->month != 0)
-			span2 += (interval2->month * (30.0 * 86400));
+	span1 = interval1->time;
+	if (interval1->month != 0)
+		span1 += (interval1->month * (30.0 * 86400));
+	span2 = interval2->time;
+	if (interval2->month != 0)
+		span2 += (interval2->month * (30.0 * 86400));
 
-		return ((span1 < span2) ? -1 : (span1 > span2) ? 1 : 0);
-	}
+	return ((span1 < span2) ? -1 : (span1 > span2) ? 1 : 0);
 }
 
 Datum
@@ -866,6 +905,9 @@ overlaps_timestamp(PG_FUNCTION_ARGS)
  *	"Arithmetic" operators on date/times.
  *---------------------------------------------------------*/
 
+/* We are currently sharing some code between timestamp and timestamptz.
+ * The comparison functions are among them. - thomas 2001-09-25
+ */
 Datum
 timestamp_smaller(PG_FUNCTION_ARGS)
 {
@@ -873,17 +915,7 @@ timestamp_smaller(PG_FUNCTION_ARGS)
 	Timestamp	dt2 = PG_GETARG_TIMESTAMP(1);
 	Timestamp	result;
 
-	if (TIMESTAMP_IS_RELATIVE(dt1))
-		dt1 = SetTimestamp(dt1);
-	if (TIMESTAMP_IS_RELATIVE(dt2))
-		dt2 = SetTimestamp(dt2);
-
-	if (TIMESTAMP_IS_INVALID(dt1))
-		result = dt2;
-	else if (TIMESTAMP_IS_INVALID(dt2))
-		result = dt1;
-	else
-		result = ((dt2 < dt1) ? dt2 : dt1);
+	result = ((dt2 < dt1) ? dt2 : dt1);
 
 	PG_RETURN_TIMESTAMP(result);
 }
@@ -895,17 +927,7 @@ timestamp_larger(PG_FUNCTION_ARGS)
 	Timestamp	dt2 = PG_GETARG_TIMESTAMP(1);
 	Timestamp	result;
 
-	if (TIMESTAMP_IS_RELATIVE(dt1))
-		dt1 = SetTimestamp(dt1);
-	if (TIMESTAMP_IS_RELATIVE(dt2))
-		dt2 = SetTimestamp(dt2);
-
-	if (TIMESTAMP_IS_INVALID(dt1))
-		result = dt2;
-	else if (TIMESTAMP_IS_INVALID(dt2))
-		result = dt1;
-	else
-		result = ((dt2 > dt1) ? dt2 : dt1);
+	result = ((dt2 > dt1) ? dt2 : dt1);
 
 	PG_RETURN_TIMESTAMP(result);
 }
@@ -920,16 +942,14 @@ timestamp_mi(PG_FUNCTION_ARGS)
 
 	result = (Interval *) palloc(sizeof(Interval));
 
-	if (TIMESTAMP_IS_RELATIVE(dt1))
-		dt1 = SetTimestamp(dt1);
-	if (TIMESTAMP_IS_RELATIVE(dt2))
-		dt2 = SetTimestamp(dt2);
-
-	if (TIMESTAMP_IS_INVALID(dt1)
-		|| TIMESTAMP_IS_INVALID(dt2))
-		TIMESTAMP_INVALID(result->time);
+	if (TIMESTAMP_NOT_FINITE(dt1) || TIMESTAMP_NOT_FINITE(dt2))
+	{
+		elog(ERROR, "Unable to subtract non-finite timestamps");
+		result->time = 0;
+	}
 	else
 		result->time = JROUND(dt1 - dt2);
+
 	result->month = 0;
 
 	PG_RETURN_INTERVAL_P(result);
@@ -951,25 +971,111 @@ timestamp_pl_span(PG_FUNCTION_ARGS)
 	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
 	Interval   *span = PG_GETARG_INTERVAL_P(1);
 	Timestamp	result;
-	Timestamp	dt;
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+	{
+		result = timestamp;
+	}
+	else
+	{
+		if (span->month != 0)
+		{
+			struct tm	tt,
+					   *tm = &tt;
+			double		fsec;
+
+			if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) == 0)
+			{
+				tm->tm_mon += span->month;
+				if (tm->tm_mon > 12)
+				{
+					tm->tm_year += ((tm->tm_mon - 1) / 12);
+					tm->tm_mon = (((tm->tm_mon - 1) % 12) + 1);
+				}
+				else if (tm->tm_mon < 1)
+				{
+					tm->tm_year += ((tm->tm_mon / 12) - 1);
+					tm->tm_mon = ((tm->tm_mon % 12) + 12);
+				}
+
+				/* adjust for end of month boundary problems... */
+				if (tm->tm_mday > day_tab[isleap(tm->tm_year)][tm->tm_mon - 1])
+					tm->tm_mday = (day_tab[isleap(tm->tm_year)][tm->tm_mon - 1]);
+
+				if (tm2timestamp(tm, fsec, NULL, &timestamp) != 0)
+				{
+					elog(ERROR, "Unable to add timestamp and interval"
+						 "\n\ttimestamp_pl_span() internal error encoding timestamp");
+					PG_RETURN_NULL();
+				}
+			}
+			else
+			{
+				elog(ERROR, "Unable to add timestamp and interval"
+					 "\n\ttimestamp_pl_span() internal error decoding timestamp");
+				PG_RETURN_NULL();
+			}
+		}
+
+#ifdef ROUND_ALL
+		timestamp = JROUND(timestamp + span->time);
+#else
+		timestamp += span->time;
+#endif
+
+		result = timestamp;
+	}
+
+	PG_RETURN_TIMESTAMP(result);
+}
+
+Datum
+timestamp_mi_span(PG_FUNCTION_ARGS)
+{
+	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	Interval   *span = PG_GETARG_INTERVAL_P(1);
+	Interval	tspan;
+
+	tspan.month = -span->month;
+	tspan.time = -span->time;
+
+	return DirectFunctionCall2(timestamp_pl_span,
+							   TimestampGetDatum(timestamp),
+							   PointerGetDatum(&tspan));
+}
+
+
+/* timestamp_pl_span()
+ * Add a interval to a timestamp with time zone data type.
+ * Note that interval has provisions for qualitative year/month
+ *	units, so try to do the right thing with them.
+ * To add a month, increment the month, and use the same day of month.
+ * Then, if the next month has fewer days, set the day of month
+ *	to the last day of month.
+ * Lastly, add in the "quantitative time".
+ */
+Datum
+timestamptz_pl_span(PG_FUNCTION_ARGS)
+{
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
+	Interval   *span = PG_GETARG_INTERVAL_P(1);
+	TimestampTz	result;
 	int			tz;
 	char	   *tzn;
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
+	{
 		result = timestamp;
-	else if (INTERVAL_IS_INVALID(*span))
-		TIMESTAMP_INVALID(result);
+	}
 	else
 	{
-		dt = (TIMESTAMP_IS_RELATIVE(timestamp) ? SetTimestamp(timestamp) : timestamp);
-
 		if (span->month != 0)
 		{
 			struct tm	tt,
 					   *tm = &tt;
 			double		fsec;
 
-			if (timestamp2tm(dt, &tz, tm, &fsec, &tzn) == 0)
+			if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) == 0)
 			{
 				tm->tm_mon += span->month;
 				if (tm->tm_mon > 12)
@@ -989,30 +1095,33 @@ timestamp_pl_span(PG_FUNCTION_ARGS)
 
 				tz = DetermineLocalTimeZone(tm);
 
-				if (tm2timestamp(tm, fsec, &tz, &dt) != 0)
-					elog(ERROR, "Unable to add timestamp and interval");
-
+				if (tm2timestamp(tm, fsec, &tz, &timestamp) != 0)
+					elog(ERROR, "Unable to add timestamp and interval"
+						"\n\ttimestamptz_pl_span() internal error encoding timestamp");
 			}
 			else
-				TIMESTAMP_INVALID(dt);
+			{
+				elog(ERROR, "Unable to add timestamp and interval"
+					 "\n\ttimestamptz_pl_span() internal error decoding timestamp");
+			}
 		}
 
 #ifdef ROUND_ALL
-		dt = JROUND(dt + span->time);
+		timestamp = JROUND(timestamp + span->time);
 #else
-		dt += span->time;
+		timestamp += span->time;
 #endif
 
-		result = dt;
+		result = timestamp;
 	}
 
 	PG_RETURN_TIMESTAMP(result);
 }
 
 Datum
-timestamp_mi_span(PG_FUNCTION_ARGS)
+timestamptz_mi_span(PG_FUNCTION_ARGS)
 {
-	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
 	Interval   *span = PG_GETARG_INTERVAL_P(1);
 	Interval	tspan;
 
@@ -1051,36 +1160,23 @@ interval_smaller(PG_FUNCTION_ARGS)
 
 	result = (Interval *) palloc(sizeof(Interval));
 
-	if (INTERVAL_IS_INVALID(*interval1))
+	span1 = interval1->time;
+	if (interval1->month != 0)
+		span1 += (interval1->month * (30.0 * 86400));
+	span2 = interval2->time;
+	if (interval2->month != 0)
+		span2 += (interval2->month * (30.0 * 86400));
+
+	if (span2 < span1)
 	{
 		result->time = interval2->time;
 		result->month = interval2->month;
 	}
-	else if (INTERVAL_IS_INVALID(*interval2))
+	else
 	{
 		result->time = interval1->time;
 		result->month = interval1->month;
 	}
-	else
-	{
-		span1 = interval1->time;
-		if (interval1->month != 0)
-			span1 += (interval1->month * (30.0 * 86400));
-		span2 = interval2->time;
-		if (interval2->month != 0)
-			span2 += (interval2->month * (30.0 * 86400));
-
-		if (span2 < span1)
-		{
-			result->time = interval2->time;
-			result->month = interval2->month;
-		}
-		else
-		{
-			result->time = interval1->time;
-			result->month = interval1->month;
-		}
-	}
 
 	PG_RETURN_INTERVAL_P(result);
 }
@@ -1096,36 +1192,23 @@ interval_larger(PG_FUNCTION_ARGS)
 
 	result = (Interval *) palloc(sizeof(Interval));
 
-	if (INTERVAL_IS_INVALID(*interval1))
+	span1 = interval1->time;
+	if (interval1->month != 0)
+		span1 += (interval1->month * (30.0 * 86400));
+	span2 = interval2->time;
+	if (interval2->month != 0)
+		span2 += (interval2->month * (30.0 * 86400));
+
+	if (span2 > span1)
 	{
 		result->time = interval2->time;
 		result->month = interval2->month;
 	}
-	else if (INTERVAL_IS_INVALID(*interval2))
+	else
 	{
 		result->time = interval1->time;
 		result->month = interval1->month;
 	}
-	else
-	{
-		span1 = interval1->time;
-		if (interval1->month != 0)
-			span1 += (interval1->month * (30.0 * 86400));
-		span2 = interval2->time;
-		if (interval2->month != 0)
-			span2 += (interval2->month * (30.0 * 86400));
-
-		if (span2 > span1)
-		{
-			result->time = interval2->time;
-			result->month = interval2->month;
-		}
-		else
-		{
-			result->time = interval1->time;
-			result->month = interval1->month;
-		}
-	}
 
 	PG_RETURN_INTERVAL_P(result);
 }
@@ -1200,7 +1283,7 @@ interval_div(PG_FUNCTION_ARGS)
 	result = (Interval *) palloc(sizeof(Interval));
 
 	if (factor == 0.0)
-		elog(ERROR, "interval_div:  divide by 0.0 error");
+		elog(ERROR, "interval_div: divide by 0.0 error");
 
 	months = (span1->month / factor);
 	result->month = rint(months);
@@ -1321,16 +1404,8 @@ timestamp_age(PG_FUNCTION_ARGS)
 
 	result = (Interval *) palloc(sizeof(Interval));
 
-	if (TIMESTAMP_IS_RELATIVE(dt1))
-		dt1 = SetTimestamp(dt1);
-	if (TIMESTAMP_IS_RELATIVE(dt2))
-		dt2 = SetTimestamp(dt2);
-
-	if (TIMESTAMP_IS_INVALID(dt1)
-		|| TIMESTAMP_IS_INVALID(dt2))
-		TIMESTAMP_INVALID(result->time);
-	else if ((timestamp2tm(dt1, NULL, tm1, &fsec1, NULL) == 0)
-			 && (timestamp2tm(dt2, NULL, tm2, &fsec2, NULL) == 0))
+	if ((timestamp2tm(dt1, NULL, tm1, &fsec1, NULL) == 0)
+		&& (timestamp2tm(dt2, NULL, tm2, &fsec2, NULL) == 0))
 	{
 		fsec = (fsec1 - fsec2);
 		tm->tm_sec = (tm1->tm_sec - tm2->tm_sec);
@@ -1403,31 +1478,140 @@ timestamp_age(PG_FUNCTION_ARGS)
 		}
 
 		if (tm2interval(tm, fsec, result) != 0)
-			elog(ERROR, "Unable to decode timestamp");
+			elog(ERROR, "Unable to encode interval"
+				 "\n\ttimestamp_age() internal coding error");
 	}
 	else
-		elog(ERROR, "Unable to decode timestamp");
+		elog(ERROR, "Unable to decode timestamp"
+			 "\n\ttimestamp_age() internal coding error");
 
 	PG_RETURN_INTERVAL_P(result);
 }
 
 
-/*----------------------------------------------------------
- *	Conversion operators.
- *---------------------------------------------------------*/
-
-
-/* timestamp_text()
- * Convert timestamp to text data type.
+/* timestamptz_age()
+ * Calculate time difference while retaining year/month fields.
+ * Note that this does not result in an accurate absolute time span
+ *	since year and month are out of context once the arithmetic
+ *	is done.
  */
 Datum
-timestamp_text(PG_FUNCTION_ARGS)
+timestamptz_age(PG_FUNCTION_ARGS)
 {
-	/* Input is a Timestamp, but may as well leave it in Datum form */
-	Datum		timestamp = PG_GETARG_DATUM(0);
-	text	   *result;
-	char	   *str;
-	int			len;
+	TimestampTz	dt1 = PG_GETARG_TIMESTAMP(0);
+	TimestampTz	dt2 = PG_GETARG_TIMESTAMP(1);
+	Interval   *result;
+	double		fsec,
+				fsec1,
+				fsec2;
+	struct tm	tt,
+			   *tm = &tt;
+	struct tm	tt1,
+			   *tm1 = &tt1;
+	struct tm	tt2,
+			   *tm2 = &tt2;
+
+	result = (Interval *) palloc(sizeof(Interval));
+
+	if ((timestamp2tm(dt1, NULL, tm1, &fsec1, NULL) == 0)
+		&& (timestamp2tm(dt2, NULL, tm2, &fsec2, NULL) == 0))
+	{
+		fsec = (fsec1 - fsec2);
+		tm->tm_sec = (tm1->tm_sec - tm2->tm_sec);
+		tm->tm_min = (tm1->tm_min - tm2->tm_min);
+		tm->tm_hour = (tm1->tm_hour - tm2->tm_hour);
+		tm->tm_mday = (tm1->tm_mday - tm2->tm_mday);
+		tm->tm_mon = (tm1->tm_mon - tm2->tm_mon);
+		tm->tm_year = (tm1->tm_year - tm2->tm_year);
+
+		/* flip sign if necessary... */
+		if (dt1 < dt2)
+		{
+			fsec = -fsec;
+			tm->tm_sec = -tm->tm_sec;
+			tm->tm_min = -tm->tm_min;
+			tm->tm_hour = -tm->tm_hour;
+			tm->tm_mday = -tm->tm_mday;
+			tm->tm_mon = -tm->tm_mon;
+			tm->tm_year = -tm->tm_year;
+		}
+
+		if (tm->tm_sec < 0)
+		{
+			tm->tm_sec += 60;
+			tm->tm_min--;
+		}
+
+		if (tm->tm_min < 0)
+		{
+			tm->tm_min += 60;
+			tm->tm_hour--;
+		}
+
+		if (tm->tm_hour < 0)
+		{
+			tm->tm_hour += 24;
+			tm->tm_mday--;
+		}
+
+		if (tm->tm_mday < 0)
+		{
+			if (dt1 < dt2)
+			{
+				tm->tm_mday += day_tab[isleap(tm1->tm_year)][tm1->tm_mon - 1];
+				tm->tm_mon--;
+			}
+			else
+			{
+				tm->tm_mday += day_tab[isleap(tm2->tm_year)][tm2->tm_mon - 1];
+				tm->tm_mon--;
+			}
+		}
+
+		if (tm->tm_mon < 0)
+		{
+			tm->tm_mon += 12;
+			tm->tm_year--;
+		}
+
+		/* recover sign if necessary... */
+		if (dt1 < dt2)
+		{
+			fsec = -fsec;
+			tm->tm_sec = -tm->tm_sec;
+			tm->tm_min = -tm->tm_min;
+			tm->tm_hour = -tm->tm_hour;
+			tm->tm_mday = -tm->tm_mday;
+			tm->tm_mon = -tm->tm_mon;
+			tm->tm_year = -tm->tm_year;
+		}
+
+		if (tm2interval(tm, fsec, result) != 0)
+			elog(ERROR, "Unable to decode timestamp");
+	}
+	else
+		elog(ERROR, "Unable to decode timestamp");
+
+	PG_RETURN_INTERVAL_P(result);
+}
+
+
+/*----------------------------------------------------------
+ *	Conversion operators.
+ *---------------------------------------------------------*/
+
+
+/* timestamp_text()
+ * Convert timestamp to text data type.
+ */
+Datum
+timestamp_text(PG_FUNCTION_ARGS)
+{
+	/* Input is a Timestamp, but may as well leave it in Datum form */
+	Datum		timestamp = PG_GETARG_DATUM(0);
+	text	   *result;
+	char	   *str;
+	int			len;
 
 	str = DatumGetCString(DirectFunctionCall1(timestamp_out, timestamp));
 
@@ -1472,6 +1656,60 @@ text_timestamp(PG_FUNCTION_ARGS)
 }
 
 
+/* timestamptz_text()
+ * Convert timestamp with time zone to text data type.
+ */
+Datum
+timestamptz_text(PG_FUNCTION_ARGS)
+{
+	/* Input is a Timestamp, but may as well leave it in Datum form */
+	Datum		timestamp = PG_GETARG_DATUM(0);
+	text	   *result;
+	char	   *str;
+	int			len;
+
+	str = DatumGetCString(DirectFunctionCall1(timestamptz_out, timestamp));
+
+	len = (strlen(str) + VARHDRSZ);
+
+	result = palloc(len);
+
+	VARATT_SIZEP(result) = len;
+	memmove(VARDATA(result), str, (len - VARHDRSZ));
+
+	pfree(str);
+
+	PG_RETURN_TEXT_P(result);
+}
+
+/* text_timestamptz()
+ * Convert text string to timestamp with time zone.
+ * Text type is not null terminated, so use temporary string
+ *	then call the standard input routine.
+ */
+Datum
+text_timestamptz(PG_FUNCTION_ARGS)
+{
+	text	   *str = PG_GETARG_TEXT_P(0);
+	int			i;
+	char	   *sp,
+			   *dp,
+				dstr[MAXDATELEN + 1];
+
+	if (VARSIZE(str) - VARHDRSZ > MAXDATELEN)
+		elog(ERROR, "Bad timestamp with time zone external representation (too long)");
+
+	sp = VARDATA(str);
+	dp = dstr;
+	for (i = 0; i < (VARSIZE(str) - VARHDRSZ); i++)
+		*dp++ = *sp++;
+	*dp = '\0';
+
+	return DirectFunctionCall1(timestamptz_in,
+							   CStringGetDatum(dstr));
+}
+
+
 /* interval_text()
  * Convert interval to text data type.
  */
@@ -1484,7 +1722,7 @@ interval_text(PG_FUNCTION_ARGS)
 	int			len;
 
 	str = DatumGetCString(DirectFunctionCall1(interval_out,
-										   IntervalPGetDatum(interval)));
+											  IntervalPGetDatum(interval)));
 
 	len = (strlen(str) + VARHDRSZ);
 
@@ -1525,7 +1763,7 @@ text_interval(PG_FUNCTION_ARGS)
 }
 
 /* timestamp_trunc()
- * Extract specified field from timestamp.
+ * Truncate timestamp to specified units.
  */
 Datum
 timestamp_trunc(PG_FUNCTION_ARGS)
@@ -1533,8 +1771,6 @@ timestamp_trunc(PG_FUNCTION_ARGS)
 	text	   *units = PG_GETARG_TEXT_P(0);
 	Timestamp	timestamp = PG_GETARG_TIMESTAMP(1);
 	Timestamp	result;
-	Timestamp	dt;
-	int			tz;
 	int			type,
 				val;
 	int			i;
@@ -1542,7 +1778,6 @@ timestamp_trunc(PG_FUNCTION_ARGS)
 			   *lp,
 				lowunits[MAXDATELEN + 1];
 	double		fsec;
-	char	   *tzn;
 	struct tm	tt,
 			   *tm = &tt;
 
@@ -1559,70 +1794,146 @@ timestamp_trunc(PG_FUNCTION_ARGS)
 	type = DecodeUnits(0, lowunits, &val);
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		PG_RETURN_NULL();
+		PG_RETURN_TIMESTAMP(timestamp);
+
+	if ((type == UNITS) && (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) == 0))
+	{
+		switch (val)
+		{
+			case DTK_MILLENNIUM:
+				tm->tm_year = (tm->tm_year / 1000) * 1000;
+			case DTK_CENTURY:
+				tm->tm_year = (tm->tm_year / 100) * 100;
+			case DTK_DECADE:
+				tm->tm_year = (tm->tm_year / 10) * 10;
+			case DTK_YEAR:
+				tm->tm_mon = 1;
+			case DTK_QUARTER:
+				tm->tm_mon = (3 * (tm->tm_mon / 4)) + 1;
+			case DTK_MONTH:
+				tm->tm_mday = 1;
+			case DTK_DAY:
+				tm->tm_hour = 0;
+			case DTK_HOUR:
+				tm->tm_min = 0;
+			case DTK_MINUTE:
+				tm->tm_sec = 0;
+			case DTK_SECOND:
+				fsec = 0;
+				break;
+
+			case DTK_MILLISEC:
+				fsec = rint(fsec * 1000) / 1000;
+				break;
+
+			case DTK_MICROSEC:
+				fsec = rint(fsec * 1000000) / 1000000;
+				break;
+
+			default:
+				elog(ERROR, "Timestamp units '%s' not supported", lowunits);
+				result = 0;
+		}
+
+		if (tm2timestamp(tm, fsec, NULL, &result) != 0)
+			elog(ERROR, "Unable to truncate timestamp to '%s'", lowunits);
+	}
 	else
 	{
-		dt = (TIMESTAMP_IS_RELATIVE(timestamp) ? SetTimestamp(timestamp) : timestamp);
+		elog(ERROR, "Timestamp units '%s' not recognized", lowunits);
+		result = 0;
+	}
 
-		if ((type == UNITS) && (timestamp2tm(dt, &tz, tm, &fsec, &tzn) == 0))
-		{
-			switch (val)
-			{
-				case DTK_MILLENNIUM:
-					tm->tm_year = (tm->tm_year / 1000) * 1000;
-				case DTK_CENTURY:
-					tm->tm_year = (tm->tm_year / 100) * 100;
-				case DTK_DECADE:
-					tm->tm_year = (tm->tm_year / 10) * 10;
-				case DTK_YEAR:
-					tm->tm_mon = 1;
-				case DTK_QUARTER:
-					tm->tm_mon = (3 * (tm->tm_mon / 4)) + 1;
-				case DTK_MONTH:
-					tm->tm_mday = 1;
-				case DTK_DAY:
-					tm->tm_hour = 0;
-				case DTK_HOUR:
-					tm->tm_min = 0;
-				case DTK_MINUTE:
-					tm->tm_sec = 0;
-				case DTK_SECOND:
-					fsec = 0;
-					break;
+	PG_RETURN_TIMESTAMP(result);
+}
 
-				case DTK_MILLISEC:
-					fsec = rint(fsec * 1000) / 1000;
-					break;
+/* timestamptz_trunc()
+ * Truncate timestamp to specified units.
+ */
+Datum
+timestamptz_trunc(PG_FUNCTION_ARGS)
+{
+	text	   *units = PG_GETARG_TEXT_P(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(1);
+	TimestampTz	result;
+	int			tz;
+	int			type,
+				val;
+	int			i;
+	char	   *up,
+			   *lp,
+				lowunits[MAXDATELEN + 1];
+	double		fsec;
+	char	   *tzn;
+	struct tm	tt,
+			   *tm = &tt;
 
-				case DTK_MICROSEC:
-					fsec = rint(fsec * 1000000) / 1000000;
-					break;
+	if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
+		elog(ERROR, "Interval units '%s' not recognized",
+			 DatumGetCString(DirectFunctionCall1(textout,
+											   PointerGetDatum(units))));
+	up = VARDATA(units);
+	lp = lowunits;
+	for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
+		*lp++ = tolower((unsigned char) *up++);
+	*lp = '\0';
 
-				default:
-					elog(ERROR, "Timestamp units '%s' not supported", lowunits);
-					result = 0;
-			}
+	type = DecodeUnits(0, lowunits, &val);
 
-			tz = DetermineLocalTimeZone(tm);
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+		PG_RETURN_TIMESTAMPTZ(timestamp);
 
-			if (tm2timestamp(tm, fsec, &tz, &result) != 0)
-				elog(ERROR, "Unable to truncate timestamp to '%s'", lowunits);
-		}
-#if NOT_USED
-		else if ((type == RESERV) && (val == DTK_EPOCH))
-		{
-			TIMESTAMP_EPOCH(result);
-			result = dt - SetTimestamp(result);
-		}
-#endif
-		else
+	if ((type == UNITS) && (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) == 0))
+	{
+		switch (val)
 		{
-			elog(ERROR, "Timestamp units '%s' not recognized", lowunits);
-			result = 0;
+			case DTK_MILLENNIUM:
+				tm->tm_year = (tm->tm_year / 1000) * 1000;
+			case DTK_CENTURY:
+				tm->tm_year = (tm->tm_year / 100) * 100;
+			case DTK_DECADE:
+				tm->tm_year = (tm->tm_year / 10) * 10;
+			case DTK_YEAR:
+				tm->tm_mon = 1;
+			case DTK_QUARTER:
+				tm->tm_mon = (3 * (tm->tm_mon / 4)) + 1;
+			case DTK_MONTH:
+				tm->tm_mday = 1;
+			case DTK_DAY:
+				tm->tm_hour = 0;
+			case DTK_HOUR:
+				tm->tm_min = 0;
+			case DTK_MINUTE:
+				tm->tm_sec = 0;
+			case DTK_SECOND:
+				fsec = 0;
+				break;
+
+			case DTK_MILLISEC:
+				fsec = rint(fsec * 1000) / 1000;
+				break;
+
+			case DTK_MICROSEC:
+				fsec = rint(fsec * 1000000) / 1000000;
+				break;
+
+			default:
+				elog(ERROR, "Timestamp units '%s' not supported", lowunits);
+				result = 0;
 		}
+
+		tz = DetermineLocalTimeZone(tm);
+
+		if (tm2timestamp(tm, fsec, &tz, &result) != 0)
+			elog(ERROR, "Unable to truncate timestamp to '%s'", lowunits);
+	}
+	else
+	{
+		elog(ERROR, "Timestamp units '%s' not recognized", lowunits);
+		PG_RETURN_NULL();
 	}
 
-	PG_RETURN_TIMESTAMP(result);
+	PG_RETURN_TIMESTAMPTZ(result);
 }
 
 /* interval_trunc()
@@ -1658,14 +1969,7 @@ interval_trunc(PG_FUNCTION_ARGS)
 
 	type = DecodeUnits(0, lowunits, &val);
 
-	if (INTERVAL_IS_INVALID(*interval))
-	{
-#if NOT_USED
-		elog(ERROR, "Interval is not finite");
-#endif
-		PG_RETURN_NULL();
-	}
-	else if (type == UNITS)
+	if (type == UNITS)
 	{
 		if (interval2tm(*interval, tm, &fsec) == 0)
 		{
@@ -1703,7 +2007,6 @@ interval_trunc(PG_FUNCTION_ARGS)
 
 				default:
 					elog(ERROR, "Interval units '%s' not supported", lowunits);
-					PG_RETURN_NULL();
 			}
 
 			if (tm2interval(tm, fsec, result) != 0)
@@ -1712,28 +2015,16 @@ interval_trunc(PG_FUNCTION_ARGS)
 		}
 		else
 		{
-			elog(NOTICE, "Interval out of range");
-			PG_RETURN_NULL();
-		}
-
-	}
-#if NOT_USED
-	else if ((type == RESERV) && (val == DTK_EPOCH))
-	{
-		*result = interval->time;
-		if (interval->month != 0)
-		{
-			*result += ((365.25 * 86400) * (interval->month / 12));
-			*result += ((30 * 86400) * (interval->month % 12));
+			elog(NOTICE, "Unable to decode interval; internal coding error");
+			*result = *interval;
 		}
 	}
-#endif
 	else
 	{
 		elog(ERROR, "Interval units '%s' not recognized",
 			 DatumGetCString(DirectFunctionCall1(textout,
-											   PointerGetDatum(units))));
-		PG_RETURN_NULL();
+												 PointerGetDatum(units))));
+		*result = *interval;
 	}
 
 	PG_RETURN_INTERVAL_P(result);
@@ -1828,7 +2119,6 @@ timestamp_part(PG_FUNCTION_ARGS)
 	text	   *units = PG_GETARG_TEXT_P(0);
 	Timestamp	timestamp = PG_GETARG_TIMESTAMP(1);
 	float8		result;
-	Timestamp	dt;
 	int			tz;
 	int			type,
 				val;
@@ -1845,7 +2135,7 @@ timestamp_part(PG_FUNCTION_ARGS)
 	if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
 		elog(ERROR, "Interval units '%s' not recognized",
 			 DatumGetCString(DirectFunctionCall1(textout,
-											   PointerGetDatum(units))));
+												 PointerGetDatum(units))));
 	up = VARDATA(units);
 	lp = lowunits;
 	for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
@@ -1857,123 +2147,276 @@ timestamp_part(PG_FUNCTION_ARGS)
 		type = DecodeSpecial(0, lowunits, &val);
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		PG_RETURN_NULL();
-	else
 	{
-		dt = (TIMESTAMP_IS_RELATIVE(timestamp) ? SetTimestamp(timestamp) : timestamp);
+		result = 0;
+		PG_RETURN_FLOAT8(result);
+	}
 
-		if ((type == UNITS) && (timestamp2tm(dt, &tz, tm, &fsec, &tzn) == 0))
+	if ((type == UNITS) && (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) == 0))
+	{
+		switch (val)
 		{
-			switch (val)
-			{
-				case DTK_TZ:
-					result = tz;
-					break;
-
-				case DTK_TZ_MINUTE:
-					result = tz / 60;
-					TMODULO(result, dummy, 60e0);
-					break;
-
-				case DTK_TZ_HOUR:
-					dummy = tz;
-					TMODULO(dummy, result, 3600e0);
-					break;
-
-				case DTK_MICROSEC:
-					result = (fsec * 1000000);
-					break;
-
-				case DTK_MILLISEC:
-					result = (fsec * 1000);
-					break;
+			case DTK_TZ:
+				result = tz;
+				break;
+
+			case DTK_TZ_MINUTE:
+				result = tz / 60;
+				TMODULO(result, dummy, 60e0);
+				break;
+
+			case DTK_TZ_HOUR:
+				dummy = tz;
+				TMODULO(dummy, result, 3600e0);
+				break;
+
+			case DTK_MICROSEC:
+				result = (fsec * 1000000);
+				break;
+
+			case DTK_MILLISEC:
+				result = (fsec * 1000);
+				break;
+
+			case DTK_SECOND:
+				result = (tm->tm_sec + fsec);
+				break;
+
+			case DTK_MINUTE:
+				result = tm->tm_min;
+				break;
+
+			case DTK_HOUR:
+				result = tm->tm_hour;
+				break;
+
+			case DTK_DAY:
+				result = tm->tm_mday;
+				break;
+
+			case DTK_MONTH:
+				result = tm->tm_mon;
+				break;
+
+			case DTK_QUARTER:
+				result = ((tm->tm_mon - 1) / 3) + 1;
+				break;
+
+			case DTK_WEEK:
+				result = (float8) date2isoweek(tm->tm_year, tm->tm_mon, tm->tm_mday);
+				break;
+
+			case DTK_YEAR:
+				result = tm->tm_year;
+				break;
+
+			case DTK_DECADE:
+				result = (tm->tm_year / 10);
+				break;
+
+			case DTK_CENTURY:
+				result = (tm->tm_year / 100);
+				break;
+
+			case DTK_MILLENNIUM:
+				result = (tm->tm_year / 1000);
+				break;
+
+			default:
+				elog(ERROR, "Timestamp units '%s' not supported", lowunits);
+				result = 0;
+		}
 
-				case DTK_SECOND:
-					result = (tm->tm_sec + fsec);
-					break;
+	}
+	else if (type == RESERV)
+	{
+		switch (val)
+		{
+			case DTK_EPOCH:
+				result = timestamp - SetEpochTimestamp();
+				break;
 
-				case DTK_MINUTE:
-					result = tm->tm_min;
-					break;
+			case DTK_DOW:
+				if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+					elog(ERROR, "Unable to encode timestamp");
 
-				case DTK_HOUR:
-					result = tm->tm_hour;
-					break;
+				result = j2day(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday));
+				break;
 
-				case DTK_DAY:
-					result = tm->tm_mday;
-					break;
+			case DTK_DOY:
+				if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+					elog(ERROR, "Unable to encode timestamp");
 
-				case DTK_MONTH:
-					result = tm->tm_mon;
-					break;
+				result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday)
+						  - date2j(tm->tm_year, 1, 1) + 1);
+				break;
 
-				case DTK_QUARTER:
-					result = ((tm->tm_mon - 1) / 3) + 1;
-					break;
+			default:
+				elog(ERROR, "Timestamp units '%s' not supported", lowunits);
+				result = 0;
+		}
 
-				case DTK_WEEK:
-					result = (float8) date2isoweek(tm->tm_year, tm->tm_mon, tm->tm_mday);
-					break;
+	}
+	else
+	{
+		elog(ERROR, "Timestamp units '%s' not recognized", lowunits);
+		result = 0;
+	}
 
-				case DTK_YEAR:
-					result = tm->tm_year;
-					break;
+	PG_RETURN_FLOAT8(result);
+}
 
-				case DTK_DECADE:
-					result = (tm->tm_year / 10);
-					break;
+/* timestamptz_part()
+ * Extract specified field from timestamp with time zone.
+ */
+Datum
+timestamptz_part(PG_FUNCTION_ARGS)
+{
+	text	   *units = PG_GETARG_TEXT_P(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(1);
+	float8		result;
+	int			tz;
+	int			type,
+				val;
+	int			i;
+	char	   *up,
+			   *lp,
+				lowunits[MAXDATELEN + 1];
+	double		dummy;
+	double		fsec;
+	char	   *tzn;
+	struct tm	tt,
+			   *tm = &tt;
 
-				case DTK_CENTURY:
-					result = (tm->tm_year / 100);
-					break;
+	if (VARSIZE(units) - VARHDRSZ > MAXDATELEN)
+		elog(ERROR, "Interval units '%s' not recognized",
+			 DatumGetCString(DirectFunctionCall1(textout,
+											   PointerGetDatum(units))));
+	up = VARDATA(units);
+	lp = lowunits;
+	for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
+		*lp++ = tolower((unsigned char) *up++);
+	*lp = '\0';
 
-				case DTK_MILLENNIUM:
-					result = (tm->tm_year / 1000);
-					break;
+	type = DecodeUnits(0, lowunits, &val);
+	if (type == IGNORE)
+		type = DecodeSpecial(0, lowunits, &val);
 
-				default:
-					elog(ERROR, "Timestamp units '%s' not supported", lowunits);
-					result = 0;
-			}
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+	{
+		result = 0;
+		PG_RETURN_FLOAT8(result);
+	}
 
-		}
-		else if (type == RESERV)
+	if ((type == UNITS) && (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) == 0))
+	{
+		switch (val)
 		{
-			switch (val)
-			{
-				case DTK_EPOCH:
-					TIMESTAMP_EPOCH(result);
-					result = dt - SetTimestamp(result);
-					break;
+			case DTK_TZ:
+				result = tz;
+				break;
+
+			case DTK_TZ_MINUTE:
+				result = tz / 60;
+				TMODULO(result, dummy, 60e0);
+				break;
+
+			case DTK_TZ_HOUR:
+				dummy = tz;
+				TMODULO(dummy, result, 3600e0);
+				break;
+
+			case DTK_MICROSEC:
+				result = (fsec * 1000000);
+				break;
+
+			case DTK_MILLISEC:
+				result = (fsec * 1000);
+				break;
+
+			case DTK_SECOND:
+				result = (tm->tm_sec + fsec);
+				break;
+
+			case DTK_MINUTE:
+				result = tm->tm_min;
+				break;
+
+			case DTK_HOUR:
+				result = tm->tm_hour;
+				break;
+
+			case DTK_DAY:
+				result = tm->tm_mday;
+				break;
+
+			case DTK_MONTH:
+				result = tm->tm_mon;
+				break;
+
+			case DTK_QUARTER:
+				result = ((tm->tm_mon - 1) / 3) + 1;
+				break;
+
+			case DTK_WEEK:
+				result = (float8) date2isoweek(tm->tm_year, tm->tm_mon, tm->tm_mday);
+				break;
+
+			case DTK_YEAR:
+				result = tm->tm_year;
+				break;
+
+			case DTK_DECADE:
+				result = (tm->tm_year / 10);
+				break;
+
+			case DTK_CENTURY:
+				result = (tm->tm_year / 100);
+				break;
+
+			case DTK_MILLENNIUM:
+				result = (tm->tm_year / 1000);
+				break;
+
+			default:
+				elog(ERROR, "Timestamp with time zone units '%s' not supported", lowunits);
+				result = 0;
+		}
 
-				case DTK_DOW:
-					if (timestamp2tm(dt, &tz, tm, &fsec, &tzn) != 0)
-						elog(ERROR, "Unable to encode timestamp");
+	}
+	else if (type == RESERV)
+	{
+		switch (val)
+		{
+			case DTK_EPOCH:
+				result = timestamp - SetEpochTimestamp();
+				break;
 
-					result = j2day(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday));
-					break;
+			case DTK_DOW:
+				if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+					elog(ERROR, "Unable to encode timestamp with time zone");
 
-				case DTK_DOY:
-					if (timestamp2tm(dt, &tz, tm, &fsec, &tzn) != 0)
-						elog(ERROR, "Unable to encode timestamp");
+				result = j2day(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday));
+				break;
 
-					result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday)
-							  - date2j(tm->tm_year, 1, 1) + 1);
-					break;
+			case DTK_DOY:
+				if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+					elog(ERROR, "Unable to encode timestamp with time zone");
 
-				default:
-					elog(ERROR, "Timestamp units '%s' not supported", lowunits);
-					result = 0;
-			}
+				result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday)
+						  - date2j(tm->tm_year, 1, 1) + 1);
+				break;
 
-		}
-		else
-		{
-			elog(ERROR, "Timestamp units '%s' not recognized", lowunits);
-			result = 0;
+			default:
+				elog(ERROR, "Timestamp with time zone units '%s' not supported", lowunits);
+				result = 0;
 		}
 	}
+	else
+	{
+		elog(ERROR, "Timestamp with time zone units '%s' not recognized", lowunits);
+		result = 0;
+	}
 
 	PG_RETURN_FLOAT8(result);
 }
@@ -2012,14 +2455,7 @@ interval_part(PG_FUNCTION_ARGS)
 	if (type == IGNORE)
 		type = DecodeSpecial(0, lowunits, &val);
 
-	if (INTERVAL_IS_INVALID(*interval))
-	{
-#if NOT_USED
-		elog(ERROR, "Interval is not finite");
-#endif
-		result = 0;
-	}
-	else if (type == UNITS)
+	if (type == UNITS)
 	{
 		if (interval2tm(*interval, tm, &fsec) == 0)
 		{
@@ -2074,7 +2510,7 @@ interval_part(PG_FUNCTION_ARGS)
 					break;
 
 				default:
-					elog(ERROR, "Interval units '%s' not yet supported",
+					elog(ERROR, "Interval units '%s' not supported",
 						 DatumGetCString(DirectFunctionCall1(textout,
 											   PointerGetDatum(units))));
 					result = 0;
@@ -2083,7 +2519,8 @@ interval_part(PG_FUNCTION_ARGS)
 		}
 		else
 		{
-			elog(NOTICE, "Interval out of range");
+			elog(NOTICE, "Unable to decode interval"
+				 "\n\tinterval_part() internal coding error");
 			result = 0;
 		}
 	}
@@ -2116,8 +2553,142 @@ timestamp_zone(PG_FUNCTION_ARGS)
 {
 	text	   *zone = PG_GETARG_TEXT_P(0);
 	Timestamp	timestamp = PG_GETARG_TIMESTAMP(1);
+	TimestampTz	result;
+	int			tz;
+	int			type,
+				val;
+	int			i;
+	char	   *up,
+			   *lp,
+				lowzone[MAXDATELEN + 1];
+
+	if (VARSIZE(zone) - VARHDRSZ > MAXDATELEN)
+		elog(ERROR, "Time zone '%s' not recognized",
+			 DatumGetCString(DirectFunctionCall1(textout,
+												 PointerGetDatum(zone))));
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+		PG_RETURN_TIMESTAMPTZ(timestamp);
+
+	up = VARDATA(zone);
+	lp = lowzone;
+	for (i = 0; i < (VARSIZE(zone) - VARHDRSZ); i++)
+		*lp++ = tolower((unsigned char) *up++);
+	*lp = '\0';
+
+	type = DecodeSpecial(0, lowzone, &val);
+
+	if ((type == TZ) || (type == DTZ))
+	{
+		tz = val * 60;
+		result = timestamp - tz;
+	}
+	else
+	{
+		elog(ERROR, "Time zone '%s' not recognized", lowzone);
+		PG_RETURN_NULL();
+	}
+
+	PG_RETURN_TIMESTAMPTZ(result);
+}	/* timestamp_zone() */
+
+/* timestamp_izone()
+ * Encode timestamp type with specified time interval as time zone.
+ * Require ISO-formatted result, since character-string time zone is not available.
+ */
+Datum
+timestamp_izone(PG_FUNCTION_ARGS)
+{
+	Interval   *zone = PG_GETARG_INTERVAL_P(0);
+	Timestamp	timestamp = PG_GETARG_TIMESTAMP(1);
+	TimestampTz	result;
+	int			tz;
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+		PG_RETURN_TIMESTAMPTZ(timestamp);
+
+	if (zone->month != 0)
+		elog(ERROR, "INTERVAL time zone '%s' not legal (month specified)",
+			 DatumGetCString(DirectFunctionCall1(interval_out,
+												 PointerGetDatum(zone))));
+
+	tz = -(zone->time);
+	result = timestamp - tz;
+
+	PG_RETURN_TIMESTAMPTZ(result);
+}	/* timestamp_izone() */
+
+/* timestamp_timestamptz()
+ * Convert local timestamp to timestamp at GMT
+ */
+Datum
+timestamp_timestamptz(PG_FUNCTION_ARGS)
+{
+	Timestamp	timestamp = PG_GETARG_TIMESTAMP(0);
+	TimestampTz	result;
+	struct tm	tt,
+			   *tm = &tt;
+	double		fsec;
+	int			tz;
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+	{
+		result = timestamp;
+	}
+	else
+	{
+		if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL) != 0)
+			elog(ERROR, "Unable to convert timestamp to timestamp with time zone (tm)");
+
+		tz = DetermineLocalTimeZone(tm);
+
+		if (tm2timestamp(tm, fsec, &tz, &result) != 0)
+			elog(ERROR, "Unable to convert timestamp to timestamp with time zone");
+	}
+
+	PG_RETURN_TIMESTAMPTZ(result);
+}
+
+/* timestamptz_timestamp()
+ * Convert timestamp at GMT to local timestamp
+ */
+Datum
+timestamptz_timestamp(PG_FUNCTION_ARGS)
+{
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(0);
+	Timestamp	result;
+	struct tm	tt,
+			   *tm = &tt;
+	double		fsec;
+	char	   *tzn;
+	int			tz;
+
+	if (TIMESTAMP_NOT_FINITE(timestamp))
+	{
+		result = timestamp;
+	}
+	else
+	{
+		if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn) != 0)
+			elog(ERROR, "Unable to convert timestamp with time zone to timestamp (tm)");
+
+		if (tm2timestamp(tm, fsec, NULL, &result) != 0)
+			elog(ERROR, "Unable to convert timestamp with time zone to timestamp");
+	}
+
+	PG_RETURN_TIMESTAMP(result);
+}
+
+/* timestamptz_zone()
+ * Encode timestamp with time zone type with specified time zone.
+ */
+Datum
+timestamptz_zone(PG_FUNCTION_ARGS)
+{
+	text	   *zone = PG_GETARG_TEXT_P(0);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(1);
 	text	   *result;
-	Timestamp	dt;
+	TimestampTz	dt;
 	int			tz;
 	int			type,
 				val;
@@ -2146,17 +2717,18 @@ timestamp_zone(PG_FUNCTION_ARGS)
 	type = DecodeSpecial(0, lowzone, &val);
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		PG_RETURN_NULL();
-	else if ((type == TZ) || (type == DTZ))
+		PG_RETURN_TEXT_P(pstrdup(""));
+
+	if ((type == TZ) || (type == DTZ))
 	{
 		tm->tm_isdst = ((type == DTZ) ? 1 : 0);
 		tz = val * 60;
 
-		dt = (TIMESTAMP_IS_RELATIVE(timestamp) ? SetTimestamp(timestamp) : timestamp);
-		dt = dt2local(dt, tz);
+		dt = dt2local(timestamp, tz);
 
 		if (timestamp2tm(dt, NULL, tm, &fsec, NULL) != 0)
-			elog(ERROR, "Timestamp not legal");
+			elog(ERROR, "Unable to decode timestamp"
+				 "\n\ttimestamp_zone() internal coding error");
 
 		up = upzone;
 		lp = lowzone;
@@ -2177,23 +2749,23 @@ timestamp_zone(PG_FUNCTION_ARGS)
 	else
 	{
 		elog(ERROR, "Time zone '%s' not recognized", lowzone);
-		result = NULL;
+		PG_RETURN_TEXT_P(pstrdup(""));
 	}
 
 	PG_RETURN_TEXT_P(result);
-}	/* timestamp_zone() */
+}	/* timestamptz_zone() */
 
-/* timestamp_izone()
- * Encode timestamp type with specified time interval as time zone.
+/* timestamptz_izone()
+ * Encode timestamp with time zone type with specified time interval as time zone.
  * Require ISO-formatted result, since character-string time zone is not available.
  */
 Datum
-timestamp_izone(PG_FUNCTION_ARGS)
+timestamptz_izone(PG_FUNCTION_ARGS)
 {
 	Interval   *zone = PG_GETARG_INTERVAL_P(0);
-	Timestamp	timestamp = PG_GETARG_TIMESTAMP(1);
+	TimestampTz	timestamp = PG_GETARG_TIMESTAMP(1);
 	text	   *result;
-	Timestamp	dt;
+	TimestampTz	dt;
 	int			tz;
 	char	   *tzn = "";
 	double		fsec;
@@ -2203,19 +2775,21 @@ timestamp_izone(PG_FUNCTION_ARGS)
 	int			len;
 
 	if (TIMESTAMP_NOT_FINITE(timestamp))
-		PG_RETURN_NULL();
+		PG_RETURN_TEXT_P(pstrdup(""));
 
 	if (zone->month != 0)
-		elog(ERROR, "INTERVAL time zone not legal (month specified)");
+		elog(ERROR, "INTERVAL time zone '%s' not legal (month specified)",
+			 DatumGetCString(DirectFunctionCall1(interval_out,
+												 PointerGetDatum(zone))));
 
 	tm->tm_isdst = -1;
 	tz = -(zone->time);
 
-	dt = (TIMESTAMP_IS_RELATIVE(timestamp) ? SetTimestamp(timestamp) : timestamp);
-	dt = dt2local(dt, tz);
+	dt = dt2local(timestamp, tz);
 
 	if (timestamp2tm(dt, NULL, tm, &fsec, NULL) != 0)
-		elog(ERROR, "Timestamp not legal");
+		elog(ERROR, "Unable to decode timestamp"
+			"\n\ttimestamp_izone() internal coding error");
 
 	EncodeDateTime(tm, fsec, &tz, &tzn, USE_ISO_DATES, buf);
 	len = (strlen(buf) + VARHDRSZ);
@@ -2225,4 +2799,4 @@ timestamp_izone(PG_FUNCTION_ARGS)
 	memmove(VARDATA(result), buf, (len - VARHDRSZ));
 
 	PG_RETURN_TEXT_P(result);
-}	/* timestamp_izone() */
+}	/* timestamptz_izone() */
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 55c043511778e8edaa455808baa430c2fbb05f28..be5e9db665bfeaf762c75cdd1c8bc1af674d0741 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: xact.h,v 1.36 2001/08/26 16:56:00 tgl Exp $
+ * $Id: xact.h,v 1.37 2001/09/28 08:09:12 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -17,6 +17,7 @@
 #include "access/transam.h"
 #include "access/xlog.h"
 #include "utils/nabstime.h"
+#include "utils/timestamp.h"
 
 /*
  * Xact isolation levels
@@ -39,6 +40,7 @@ typedef struct TransactionStateData
 	CommandId	commandId;
 	CommandId	scanCommandId;
 	AbsoluteTime startTime;
+	int			startTimeMsec;
 	int			state;
 	int			blockState;
 } TransactionStateData;
@@ -104,6 +106,7 @@ extern CommandId GetCurrentCommandId(void);
 extern CommandId GetScanCommandId(void);
 extern void SetScanCommandId(CommandId);
 extern AbsoluteTime GetCurrentTransactionStartTime(void);
+extern AbsoluteTime GetCurrentTransactionStartTimeUsec(int *usec);
 extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
 extern bool CommandIdIsCurrentCommandId(CommandId cid);
 extern bool CommandIdGEScanCommandId(CommandId cid);
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 5008df24716e68893fa769d6fd334d1894016f81..b7c4b3fb8adb5b36a7c5843a35295d165ccc4a77 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: catversion.h,v 1.95 2001/09/14 17:46:40 momjian Exp $
+ * $Id: catversion.h,v 1.96 2001/09/28 08:09:13 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,6 +53,6 @@
  */
 
 /*							yyyymmddN */
-#define CATALOG_VERSION_NO	200109101
+#define CATALOG_VERSION_NO	200109261
 
 #endif
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids
index 7d5cd2eafdc9b2b97db6c2609ebceab189c2cbcd..9f7845c698d978585b3e21fc19827a30b303c745 100755
--- a/src/include/catalog/duplicate_oids
+++ b/src/include/catalog/duplicate_oids
@@ -8,10 +8,21 @@
 # no multibytes files
 FILES=`ls pg_*.h |grep -v '_mb.h'`
 
+#
+# The previous version did not use the -d option on uniq
+# so check here that it is supported.
+# Otherwise, use the old algorithm
+#
+
+if [ `uniq -d < /dev/null > /dev/null 2>&1` ]; then
+  echo "uniq -d is not supported on your platform."
+  echo "Please report this to pgsql-hackers@postgresql.org"
+
 egrep '^DATA' $FILES | \
 	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \
 	sort -n >/tmp/alloids.$$
 uniq /tmp/alloids.$$ >/tmp/uniqoids.$$
+
 diff -u /tmp/alloids.$$ /tmp/uniqoids.$$ | \
 	grep -v '/tmp/' | \
 	grep '^-' | \
@@ -21,3 +32,16 @@ diff -u /tmp/alloids.$$ /tmp/uniqoids.$$ | \
 rm /tmp/alloids.$$
 rm /tmp/uniqoids.$$
 
+else
+
+#  echo "uniq -d is supported on this platform."
+#  echo "Will omit the use of temporary files."
+
+egrep '^DATA' $FILES | \
+	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \
+	sort -n | uniq -d | \
+	egrep -v '^[0]*$'
+
+fi
+
+exit
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index ccb70eb7faf932287dd7918e22ebabff3682f62b..cc0edd22fca391273f7e0629c8cae7685af0973c 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_aggregate.h,v 1.31 2001/08/14 22:21:58 tgl Exp $
+ * $Id: pg_aggregate.h,v 1.32 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -109,7 +109,8 @@ DATA(insert OID = 0 ( max	PGUID date_larger		- 1082 1082 1082 _null_ ));
 DATA(insert OID = 0 ( max	PGUID time_larger		- 1083 1083 1083 _null_ ));
 DATA(insert OID = 0 ( max	PGUID timetz_larger		- 1266 1266 1266 _null_ ));
 DATA(insert OID = 0 ( max	PGUID cashlarger		-  790	790  790 _null_ ));
-DATA(insert OID = 0 ( max	PGUID timestamp_larger	- 1184 1184 1184 _null_ ));
+DATA(insert OID = 0 ( max	PGUID timestamp_larger	- 1114 1114 1114 _null_ ));
+DATA(insert OID = 0 ( max	PGUID timestamptz_larger - 1184 1184 1184 _null_ ));
 DATA(insert OID = 0 ( max	PGUID interval_larger	- 1186 1186 1186 _null_ ));
 DATA(insert OID = 0 ( max	PGUID text_larger		-	25	 25   25 _null_ ));
 DATA(insert OID = 0 ( max	PGUID numeric_larger	- 1700 1700 1700 _null_ ));
@@ -125,7 +126,8 @@ DATA(insert OID = 0 ( min	PGUID date_smaller		- 1082 1082 1082 _null_ ));
 DATA(insert OID = 0 ( min	PGUID time_smaller		- 1083 1083 1083 _null_ ));
 DATA(insert OID = 0 ( min	PGUID timetz_smaller	- 1266 1266 1266 _null_ ));
 DATA(insert OID = 0 ( min	PGUID cashsmaller		-  790	790  790 _null_ ));
-DATA(insert OID = 0 ( min	PGUID timestamp_smaller - 1184 1184 1184 _null_ ));
+DATA(insert OID = 0 ( min	PGUID timestamp_smaller - 1114 1114 1114 _null_ ));
+DATA(insert OID = 0 ( min	PGUID timestamptz_smaller - 1184 1184 1184 _null_ ));
 DATA(insert OID = 0 ( min	PGUID interval_smaller	- 1186 1186 1186 _null_ ));
 DATA(insert OID = 0 ( min	PGUID text_smaller		-	25	 25   25 _null_ ));
 DATA(insert OID = 0 ( min	PGUID numeric_smaller	- 1700 1700 1700 _null_ ));
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index b630c824eb0b0adbc4ea667c9e921d17f1fd3dc9..e5a6fb872cbef74e579005f971baab8514d79536 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -16,7 +16,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_amop.h,v 1.41 2001/08/21 16:36:05 tgl Exp $
+ * $Id: pg_amop.h,v 1.42 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	 the genbki.sh script reads this file and generates .bki
@@ -282,6 +282,16 @@ DATA(insert (	2000 5 f 1554 ));
  *	btree timestamp_ops
  */
 
+DATA(insert (	2039 1 f 2062 ));
+DATA(insert (	2039 2 f 2063 ));
+DATA(insert (	2039 3 f 2060 ));
+DATA(insert (	2039 4 f 2065 ));
+DATA(insert (	2039 5 f 2064 ));
+
+/*
+ *	btree timestamptz_ops
+ */
+
 DATA(insert (	1998 1 f 1322 ));
 DATA(insert (	1998 2 f 1323 ));
 DATA(insert (	1998 3 f 1320 ));
@@ -407,11 +417,13 @@ DATA(insert (	1992 1 f  649 ));
 DATA(insert (	1995 1 f   98 ));
 /* time_ops */
 DATA(insert (	1997 1 f 1108 ));
-/* timestamp_ops */
+/* timestamptz_ops */
 DATA(insert (	1999 1 f 1320 ));
 /* timetz_ops */
 DATA(insert (	2001 1 f 1550 ));
 /* varchar_ops */
 DATA(insert (	2004 1 f 1062 ));
+/* timestamp_ops */
+DATA(insert (	2040 1 f 2060 ));
 
 #endif	 /* PG_AMOP_H */
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index e802c6fd107ac9107f2b45640277e7913daeb027..520bf821bb6224f5b9ec1cc40ed80ba7da1d3781 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -14,7 +14,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_amproc.h,v 1.30 2001/08/21 16:36:05 tgl Exp $
+ * $Id: pg_amproc.h,v 1.31 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -104,6 +104,7 @@ DATA(insert (	1998 1 1314 ));
 DATA(insert (	2000 1 1358 ));
 DATA(insert (	2002 1 1672 ));
 DATA(insert (	2003 1 1079 ));
+DATA(insert (	2039 1 1314 ));
 
 
 /* hash */
@@ -127,5 +128,6 @@ DATA(insert (	1997 1  452 ));
 DATA(insert (	1999 1  452 ));
 DATA(insert (	2001 1 1696 ));
 DATA(insert (	2004 1  456 ));
+DATA(insert (	2040 1  452 ));
 
 #endif	 /* PG_AMPROC_H */
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 0b3b91758c3f3923f85b850ff2c1f2b42f6227a9..4b07349c0fdd2925b88cd7db935e3dbdb7925032 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -26,7 +26,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_opclass.h,v 1.39 2001/08/21 16:36:05 tgl Exp $
+ * $Id: pg_opclass.h,v 1.40 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -127,12 +127,14 @@ DATA(insert OID = 1994 (	403		text_ops		  25	t	0 ));
 DATA(insert OID = 1995 (	405		text_ops		  25	t	0 ));
 DATA(insert OID = 1996 (	403		time_ops		1083	t	0 ));
 DATA(insert OID = 1997 (	405		time_ops		1083	t	0 ));
-DATA(insert OID = 1998 (	403		timestamp_ops	1184	t	0 ));
-DATA(insert OID = 1999 (	405		timestamp_ops	1184	t	0 ));
+DATA(insert OID = 1998 (	403		timestamptz_ops	1184	t	0 ));
+DATA(insert OID = 1999 (	405		timestamptz_ops	1184	t	0 ));
 DATA(insert OID = 2000 (	403		timetz_ops		1266	t	0 ));
 DATA(insert OID = 2001 (	405		timetz_ops		1266	t	0 ));
 DATA(insert OID = 2002 (	403		varbit_ops		1562	t	0 ));
 DATA(insert OID = 2003 (	403		varchar_ops		1043	t	0 ));
 DATA(insert OID = 2004 (	405		varchar_ops		1043	t	0 ));
+DATA(insert OID = 2039 (	403		timestamp_ops	1114	t	0 ));
+DATA(insert OID = 2040 (	405		timestamp_ops	1114	t	0 ));
 
 #endif	 /* PG_OPCLASS_H */
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index 4919e3e37b1fdaa580d4358215cc17dc9776835f..e5afc73ea4aaa8e7766a1ad06b05a8d63c5414c8 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_operator.h,v 1.93 2001/09/14 17:46:40 momjian Exp $
+ * $Id: pg_operator.h,v 1.94 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -483,14 +483,16 @@ DATA(insert OID = 1110 ( "<"	   PGUID 0 b t f  1083	1083  16 1112 1113	0 0 time_
 DATA(insert OID = 1111 ( "<="	   PGUID 0 b t f  1083	1083  16 1113 1112	0 0 time_le scalarltsel scalarltjoinsel ));
 DATA(insert OID = 1112 ( ">"	   PGUID 0 b t f  1083	1083  16 1110 1111	0 0 time_gt scalargtsel scalargtjoinsel ));
 DATA(insert OID = 1113 ( ">="	   PGUID 0 b t f  1083	1083  16 1111 1110	0 0 time_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1269 (  "-"	   PGUID 0 b t f  1186 1083 1083 0 0 0 0 interval_mi_time - - ));
 
 /* timetz operators */
-DATA(insert OID = 1550 ( "="	   PGUID 0 b t f  1266	1266  16 1550 1551 1552 1552 timetz_eq eqsel eqjoinsel ));
-DATA(insert OID = 1551 ( "<>"	   PGUID 0 b t f  1266	1266  16 1551 1550	0 0 timetz_ne neqsel neqjoinsel ));
-DATA(insert OID = 1552 ( "<"	   PGUID 0 b t f  1266	1266  16 1554 1555	0 0 timetz_lt scalarltsel scalarltjoinsel ));
-DATA(insert OID = 1553 ( "<="	   PGUID 0 b t f  1266	1266  16 1555 1554	0 0 timetz_le scalarltsel scalarltjoinsel ));
-DATA(insert OID = 1554 ( ">"	   PGUID 0 b t f  1266	1266  16 1552 1553	0 0 timetz_gt scalargtsel scalargtjoinsel ));
-DATA(insert OID = 1555 ( ">="	   PGUID 0 b t f  1266	1266  16 1553 1552	0 0 timetz_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1295 (  "-"	   PGUID 0 b t f  1186 1266 1266 0 0 0 0 interval_mi_timetz - - ));
+DATA(insert OID = 1550 ( "="	   PGUID 0 b t f  1266 1266   16 1550 1551 1552 1552 timetz_eq eqsel eqjoinsel ));
+DATA(insert OID = 1551 ( "<>"	   PGUID 0 b t f  1266 1266   16 1551 1550	0 0 timetz_ne neqsel neqjoinsel ));
+DATA(insert OID = 1552 ( "<"	   PGUID 0 b t f  1266 1266   16 1554 1555	0 0 timetz_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1553 ( "<="	   PGUID 0 b t f  1266 1266   16 1555 1554	0 0 timetz_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1554 ( ">"	   PGUID 0 b t f  1266 1266   16 1552 1553	0 0 timetz_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1555 ( ">="	   PGUID 0 b t f  1266 1266   16 1553 1552	0 0 timetz_ge scalargtsel scalargtjoinsel ));
 
 /* float48 operators */
 DATA(insert OID = 1116 (  "+"		PGUID 0 b t f 700 701 701 1126	 0	 0	 0 float48pl - - ));
@@ -551,7 +553,7 @@ DATA(insert OID = 1234 (  "~*"		PGUID 0 b t f  1042  25  16 0 1235	0 0 texticreg
 #define OID_BPCHAR_ICREGEXEQ_OP		1234
 DATA(insert OID = 1235 ( "!~*"		PGUID 0 b t f  1042  25  16 0 1234	0 0 texticregexne icregexnesel icregexnejoinsel ));
 
-/* timestamp operators */
+/* timestamptz operators */
 /* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */
 DATA(insert OID = 1320 (  "="	   PGUID 0 b t f 1184 1184	 16 1320 1321 1322 1322 timestamp_eq eqsel eqjoinsel ));
 DATA(insert OID = 1321 (  "<>"	   PGUID 0 b t f 1184 1184	 16 1321 1320 0 0 timestamp_ne neqsel neqjoinsel ));
@@ -559,9 +561,9 @@ DATA(insert OID = 1322 (  "<"	   PGUID 0 b t f 1184 1184	 16 1324 1325 0 0 times
 DATA(insert OID = 1323 (  "<="	   PGUID 0 b t f 1184 1184	 16 1325 1324 0 0 timestamp_le scalarltsel scalarltjoinsel ));
 DATA(insert OID = 1324 (  ">"	   PGUID 0 b t f 1184 1184	 16 1322 1323 0 0 timestamp_gt scalargtsel scalargtjoinsel ));
 DATA(insert OID = 1325 (  ">="	   PGUID 0 b t f 1184 1184	 16 1323 1322 0 0 timestamp_ge scalargtsel scalargtjoinsel ));
-DATA(insert OID = 1327 (  "+"	   PGUID 0 b t f 1184 1186 1184    0	0 0 0 timestamp_pl_span - - ));
-DATA(insert OID = 1328 (  "-"	   PGUID 0 b t f 1184 1184 1186    0	0 0 0 timestamp_mi - - ));
-DATA(insert OID = 1329 (  "-"	   PGUID 0 b t f 1184 1186 1184    0	0 0 0 timestamp_mi_span - - ));
+DATA(insert OID = 1327 (  "+"	   PGUID 0 b t f 1184 1186 1184    0	0 0 0 timestamptz_pl_span - - ));
+DATA(insert OID = 1328 (  "-"	   PGUID 0 b t f 1184 1184 1186    0	0 0 0 timestamptz_mi - - ));
+DATA(insert OID = 1329 (  "-"	   PGUID 0 b t f 1184 1186 1184    0	0 0 0 timestamptz_mi_span - - ));
 
 /* interval operators */
 DATA(insert OID = 1330 (  "="	   PGUID 0 b t f 1186 1186	 16 1330 1331 1332 1332 interval_eq eqsel eqjoinsel ));
@@ -575,11 +577,13 @@ DATA(insert OID = 1336 (  "-"	   PGUID 0 l t f	0 1186 1186    0	0 0 0 interval_u
 DATA(insert OID = 1337 (  "+"	   PGUID 0 b t f 1186 1186 1186 1337	0 0 0 interval_pl - - ));
 DATA(insert OID = 1338 (  "-"	   PGUID 0 b t f 1186 1186 1186    0	0 0 0 interval_mi - - ));
 
-DATA(insert OID = 1360 (  "+"	   PGUID 0 b t f 1082 1083 1184    0	0 0 0 datetime_pl - - ));
+DATA(insert OID = 1360 (  "+"	   PGUID 0 b t f 1082 1083 1114    0	0 0 0 datetime_pl - - ));
 DATA(insert OID = 1361 (  "+"	   PGUID 0 b t f 1082 1266 1184    0	0 0 0 datetimetz_pl - - ));
-DATA(insert OID = 1363 (  "+"	   PGUID 0 b t f 1083 1082 1184    0	0 0 0 timedate_pl - - ));
+DATA(insert OID = 1363 (  "+"	   PGUID 0 b t f 1083 1082 1114    0	0 0 0 timedate_pl - - ));
 DATA(insert OID = 1366 (  "+"	   PGUID 0 b t f 1266 1082 1184    0	0 0 0 timetzdate_pl - - ));
 
+DATA(insert OID = 1399 (  "-"	   PGUID 0 b t f 1083 1083 1186    0	0 0 0 time_mi_time - - ));
+
 /* additional geometric operators - thomas 97/04/18 */
 DATA(insert OID = 1420 (  "@@"	  PGUID 0 l t f    0  718  600	  0    0	0	 0 circle_center - - ));
 DATA(insert OID = 1500 (  "="	  PGUID 0 b t f  718  718	16 1500 1501 1502 1502 circle_eq eqsel eqjoinsel ));
@@ -821,6 +825,19 @@ DATA(insert OID = 2016 (  "~~"	   PGUID 0 b t f 17 17  16 0    2017 0    0 bytea
 DATA(insert OID = 2017 (  "!~~"	   PGUID 0 b t f 17 17  16 0    2016 0    0 byteanlike nlikesel nlikejoinsel ));
 DATA(insert OID = 2018 (  "||"	   PGUID 0 b t f 17 17  17 0    0	 0    0 byteacat - - ));
 
+/* timestamp operators */
+/* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */
+DATA(insert OID = 2060 (  "="	   PGUID 0 b t f 1114 1114	 16 2060 2061 2062 2062 timestamp_eq eqsel eqjoinsel ));
+DATA(insert OID = 2061 (  "<>"	   PGUID 0 b t f 1114 1114	 16 2061 2060 0 0 timestamp_ne neqsel neqjoinsel ));
+DATA(insert OID = 2062 (  "<"	   PGUID 0 b t f 1114 1114	 16 2064 2065 0 0 timestamp_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 2063 (  "<="	   PGUID 0 b t f 1114 1114	 16 2065 2064 0 0 timestamp_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 2064 (  ">"	   PGUID 0 b t f 1114 1114	 16 2062 2063 0 0 timestamp_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 2065 (  ">="	   PGUID 0 b t f 1114 1114	 16 2063 2062 0 0 timestamp_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 2066 (  "+"	   PGUID 0 b t f 1114 1186 1114    0	0 0 0 timestamp_pl_span - - ));
+DATA(insert OID = 2067 (  "-"	   PGUID 0 b t f 1114 1114 1186    0	0 0 0 timestamp_mi - - ));
+DATA(insert OID = 2068 (  "-"	   PGUID 0 b t f 1114 1186 1114    0	0 0 0 timestamp_mi_span - - ));
+
+
 /*
  * function prototypes
  */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 90718bc10adc59b80db72c2a7c1f7d4ed29aa953..e4c8faa2b079747fa22aa0fd76955b536eb75c1b 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_proc.h,v 1.211 2001/09/14 17:46:40 momjian Exp $
+ * $Id: pg_proc.h,v 1.212 2001/09/28 08:09:13 thomas Exp $
  *
  * NOTES
  *	  The script catalog/genbki.sh reads this file and generates .bki
@@ -99,113 +99,113 @@ typedef FormData_pg_proc *Form_pg_proc;
 
 DATA(insert OID = 1242 (  boolin		   PGUID 12 f t t t 1 f 16 "0" 100 0 0	100  boolin - ));
 DESCR("(internal)");
-DATA(insert OID = 1243 (  boolout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	boolout - ));
+DATA(insert OID = 1243 (  boolout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  boolout - ));
 DESCR("(internal)");
-DATA(insert OID = 1244 (  byteain		   PGUID 12 f t t t 1 f 17 "0" 100 0 0 100	byteain - ));
+DATA(insert OID = 1244 (  byteain		   PGUID 12 f t t t 1 f 17 "0" 100 0 0 100  byteain - ));
 DESCR("(internal)");
-DATA(insert OID =  31 (  byteaout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	byteaout - ));
+DATA(insert OID =  31 (  byteaout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  byteaout - ));
 DESCR("(internal)");
-DATA(insert OID = 1245 (  charin		   PGUID 12 f t t t 1 f 18 "0" 100 0 0 100	charin - ));
+DATA(insert OID = 1245 (  charin		   PGUID 12 f t t t 1 f 18 "0" 100 0 0 100  charin - ));
 DESCR("(internal)");
-DATA(insert OID =  33 (  charout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	charout - ));
+DATA(insert OID =  33 (  charout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  charout - ));
 DESCR("(internal)");
-DATA(insert OID =  34 (  namein			   PGUID 12 f t t t 1 f 19 "0" 100 0 0 100	namein - ));
+DATA(insert OID =  34 (  namein			   PGUID 12 f t t t 1 f 19 "0" 100 0 0 100  namein - ));
 DESCR("(internal)");
-DATA(insert OID =  35 (  nameout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	nameout - ));
+DATA(insert OID =  35 (  nameout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  nameout - ));
 DESCR("(internal)");
-DATA(insert OID =  38 (  int2in			   PGUID 12 f t t t 1 f 21 "0" 100 0 0 100	int2in - ));
+DATA(insert OID =  38 (  int2in			   PGUID 12 f t t t 1 f 21 "0" 100 0 0 100  int2in - ));
 DESCR("(internal)");
-DATA(insert OID =  39 (  int2out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int2out - ));
+DATA(insert OID =  39 (  int2out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int2out - ));
 DESCR("(internal)");
-DATA(insert OID =  40 (  int2vectorin	   PGUID 12 f t t t 1 f 22 "0" 100 0 0 100	int2vectorin - ));
+DATA(insert OID =  40 (  int2vectorin	   PGUID 12 f t t t 1 f 22 "0" 100 0 0 100  int2vectorin - ));
 DESCR("(internal)");
-DATA(insert OID =  41 (  int2vectorout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int2vectorout - ));
+DATA(insert OID =  41 (  int2vectorout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int2vectorout - ));
 DESCR("(internal)");
-DATA(insert OID =  42 (  int4in			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int4in - ));
+DATA(insert OID =  42 (  int4in			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int4in - ));
 DESCR("(internal)");
-DATA(insert OID =  43 (  int4out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int4out - ));
+DATA(insert OID =  43 (  int4out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int4out - ));
 DESCR("(internal)");
-DATA(insert OID =  44 (  regprocin		   PGUID 12 f t f t 1 f 24 "0" 100 0 0 100	regprocin - ));
+DATA(insert OID =  44 (  regprocin		   PGUID 12 f t f t 1 f 24 "0" 100 0 0 100  regprocin - ));
 DESCR("(internal)");
-DATA(insert OID =  45 (  regprocout		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	regprocout - ));
+DATA(insert OID =  45 (  regprocout		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  regprocout - ));
 DESCR("(internal)");
-DATA(insert OID =  46 (  textin			   PGUID 12 f t t t 1 f 25 "0" 100 0 0 100	textin - ));
+DATA(insert OID =  46 (  textin			   PGUID 12 f t t t 1 f 25 "0" 100 0 0 100  textin - ));
 DESCR("(internal)");
-DATA(insert OID =  47 (  textout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	textout - ));
+DATA(insert OID =  47 (  textout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  textout - ));
 DESCR("(internal)");
-DATA(insert OID =  48 (  tidin			   PGUID 12 f t t t 1 f 27 "0" 100 0 0 100	tidin - ));
+DATA(insert OID =  48 (  tidin			   PGUID 12 f t t t 1 f 27 "0" 100 0 0 100  tidin - ));
 DESCR("(internal)");
-DATA(insert OID =  49 (  tidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	tidout - ));
+DATA(insert OID =  49 (  tidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  tidout - ));
 DESCR("(internal)");
-DATA(insert OID =  50 (  xidin			   PGUID 12 f t t t 1 f 28 "0" 100 0 0 100	xidin - ));
+DATA(insert OID =  50 (  xidin			   PGUID 12 f t t t 1 f 28 "0" 100 0 0 100  xidin - ));
 DESCR("(internal)");
-DATA(insert OID =  51 (  xidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	xidout - ));
+DATA(insert OID =  51 (  xidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  xidout - ));
 DESCR("(internal)");
-DATA(insert OID =  52 (  cidin			   PGUID 12 f t t t 1 f 29 "0" 100 0 0 100	cidin - ));
+DATA(insert OID =  52 (  cidin			   PGUID 12 f t t t 1 f 29 "0" 100 0 0 100  cidin - ));
 DESCR("(internal)");
-DATA(insert OID =  53 (  cidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	cidout - ));
+DATA(insert OID =  53 (  cidout			   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  cidout - ));
 DESCR("(internal)");
-DATA(insert OID =  54 (  oidvectorin	   PGUID 12 f t t t 1 f 30 "0" 100 0 0 100	oidvectorin - ));
+DATA(insert OID =  54 (  oidvectorin	   PGUID 12 f t t t 1 f 30 "0" 100 0 0 100  oidvectorin - ));
 DESCR("(internal)");
-DATA(insert OID =  55 (  oidvectorout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	oidvectorout - ));
+DATA(insert OID =  55 (  oidvectorout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  oidvectorout - ));
 DESCR("(internal)");
-DATA(insert OID =  56 (  boollt			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100	boollt - ));
+DATA(insert OID =  56 (  boollt			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  boollt - ));
 DESCR("less-than");
-DATA(insert OID =  57 (  boolgt			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100	boolgt - ));
+DATA(insert OID =  57 (  boolgt			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  boolgt - ));
 DESCR("greater-than");
-DATA(insert OID =  60 (  booleq			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100	booleq - ));
+DATA(insert OID =  60 (  booleq			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  booleq - ));
 DESCR("equal");
-DATA(insert OID =  61 (  chareq			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	chareq - ));
+DATA(insert OID =  61 (  chareq			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  chareq - ));
 DESCR("equal");
-DATA(insert OID =  62 (  nameeq			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	nameeq - ));
+DATA(insert OID =  62 (  nameeq			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  nameeq - ));
 DESCR("equal");
-DATA(insert OID =  63 (  int2eq			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2eq - ));
+DATA(insert OID =  63 (  int2eq			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2eq - ));
 DESCR("equal");
-DATA(insert OID =  64 (  int2lt			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2lt - ));
+DATA(insert OID =  64 (  int2lt			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2lt - ));
 DESCR("less-than");
-DATA(insert OID =  65 (  int4eq			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4eq - ));
+DATA(insert OID =  65 (  int4eq			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4eq - ));
 DESCR("equal");
-DATA(insert OID =  66 (  int4lt			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4lt - ));
+DATA(insert OID =  66 (  int4lt			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4lt - ));
 DESCR("less-than");
-DATA(insert OID =  67 (  texteq			   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	texteq - ));
+DATA(insert OID =  67 (  texteq			   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  texteq - ));
 DESCR("equal");
-DATA(insert OID =  68 (  xideq			   PGUID 12 f t t t 2 f 16 "28 28" 100 0 0 100	xideq - ));
+DATA(insert OID =  68 (  xideq			   PGUID 12 f t t t 2 f 16 "28 28" 100 0 0 100  xideq - ));
 DESCR("equal");
-DATA(insert OID =  69 (  cideq			   PGUID 12 f t t t 2 f 16 "29 29" 100 0 0 100	cideq - ));
+DATA(insert OID =  69 (  cideq			   PGUID 12 f t t t 2 f 16 "29 29" 100 0 0 100  cideq - ));
 DESCR("equal");
-DATA(insert OID =  70 (  charne			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	charne - ));
+DATA(insert OID =  70 (  charne			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  charne - ));
 DESCR("not equal");
-DATA(insert OID = 1246 (  charlt		   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	charlt - ));
+DATA(insert OID = 1246 (  charlt		   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  charlt - ));
 DESCR("less-than");
-DATA(insert OID =  72 (  charle			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	charle - ));
+DATA(insert OID =  72 (  charle			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  charle - ));
 DESCR("less-than-or-equal");
-DATA(insert OID =  73 (  chargt			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	chargt - ));
+DATA(insert OID =  73 (  chargt			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  chargt - ));
 DESCR("greater-than");
-DATA(insert OID =  74 (  charge			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100	charge - ));
+DATA(insert OID =  74 (  charge			   PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100  charge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1248 (  charpl		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100	charpl - ));
+DATA(insert OID = 1248 (  charpl		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100  charpl - ));
 DESCR("add");
-DATA(insert OID = 1250 (  charmi		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100	charmi - ));
+DATA(insert OID = 1250 (  charmi		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100  charmi - ));
 DESCR("subtract");
-DATA(insert OID =  77 (  charmul		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100	charmul - ));
+DATA(insert OID =  77 (  charmul		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100  charmul - ));
 DESCR("multiply");
-DATA(insert OID =  78 (  chardiv		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100	chardiv - ));
+DATA(insert OID =  78 (  chardiv		   PGUID 12 f t t t 2 f 18 "18 18" 100 0 0 100  chardiv - ));
 DESCR("divide");
 
-DATA(insert OID =  79 (  nameregexeq	   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	nameregexeq - ));
+DATA(insert OID =  79 (  nameregexeq	   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  nameregexeq - ));
 DESCR("matches regex., case-sensitive");
-DATA(insert OID = 1252 (  nameregexne	   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	nameregexne - ));
+DATA(insert OID = 1252 (  nameregexne	   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  nameregexne - ));
 DESCR("does not match regex., case-sensitive");
-DATA(insert OID = 1254 (  textregexeq	   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	textregexeq - ));
+DATA(insert OID = 1254 (  textregexeq	   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  textregexeq - ));
 DESCR("matches regex., case-sensitive");
-DATA(insert OID = 1256 (  textregexne	   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	textregexne - ));
+DATA(insert OID = 1256 (  textregexne	   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  textregexne - ));
 DESCR("does not match regex., case-sensitive");
 DATA(insert OID = 1257 (  textlen		   PGUID 12 f t t t 1 f 23 "25" 100 0 0 100  textlen - ));
 DESCR("length");
-DATA(insert OID = 1258 (  textcat		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	textcat - ));
+DATA(insert OID = 1258 (  textcat		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  textcat - ));
 DESCR("concatenate");
 
-DATA(insert OID =  84 (  boolne			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100	boolne - ));
+DATA(insert OID =  84 (  boolne			   PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  boolne - ));
 DESCR("not equal");
 DATA(insert OID =  89 (  version		   PGUID 12 f t f t 0 f 25 "" 100 0 0 100 pgsql_version - ));
 DESCR("PostgreSQL version string");
@@ -222,20 +222,20 @@ DATA(insert OID = 103 (  scalarltsel	   PGUID 12 f t f t 4 f 701 "0 26 0 23" 100
 DESCR("restriction selectivity of < and related operators on scalar datatypes");
 DATA(insert OID = 104 (  scalargtsel	   PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  scalargtsel - ));
 DESCR("restriction selectivity of > and related operators on scalar datatypes");
-DATA(insert OID = 105 (  eqjoinsel		   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	eqjoinsel - ));
+DATA(insert OID = 105 (  eqjoinsel		   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  eqjoinsel - ));
 DESCR("join selectivity of = and related operators");
-DATA(insert OID = 106 (  neqjoinsel		   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	neqjoinsel - ));
+DATA(insert OID = 106 (  neqjoinsel		   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  neqjoinsel - ));
 DESCR("join selectivity of <> and related operators");
-DATA(insert OID = 107 (  scalarltjoinsel   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	scalarltjoinsel - ));
+DATA(insert OID = 107 (  scalarltjoinsel   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  scalarltjoinsel - ));
 DESCR("join selectivity of < and related operators on scalar datatypes");
-DATA(insert OID = 108 (  scalargtjoinsel   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	scalargtjoinsel - ));
+DATA(insert OID = 108 (  scalargtjoinsel   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  scalargtjoinsel - ));
 DESCR("join selectivity of > and related operators on scalar datatypes");
 
-DATA(insert OID = 112 (  text			   PGUID 12 f t t t 1 f  25 "23" 100 0 0 100	int4_text - ));
+DATA(insert OID = 112 (  text			   PGUID 12 f t t t 1 f  25 "23" 100 0 0 100  int4_text - ));
 DESCR("convert int4 to text");
-DATA(insert OID = 113 (  text			   PGUID 12 f t t t 1 f  25 "21" 100 0 0 100	int2_text - ));
+DATA(insert OID = 113 (  text			   PGUID 12 f t t t 1 f  25 "21" 100 0 0 100  int2_text - ));
 DESCR("convert int2 to text");
-DATA(insert OID = 114 (  text			   PGUID 12 f t t t 1 f  25 "26" 100 0 0 100	oid_text - ));
+DATA(insert OID = 114 (  text			   PGUID 12 f t t t 1 f  25 "26" 100 0 0 100  oid_text - ));
 DESCR("convert oid to text");
 
 DATA(insert OID = 115 (  box_above		   PGUID 12 f t t t 2 f  16 "603 603" 100 0 0 100  box_above - ));
@@ -259,29 +259,29 @@ DATA(insert OID = 123 (  box_in			   PGUID 12 f t t t 1 f 603 "0" 100 0 0 100  b
 DESCR("(internal)");
 DATA(insert OID = 124 (  box_out		   PGUID 12 f t t t 1 f 23	"0" 100 0 0 100  box_out - ));
 DESCR("(internal)");
-DATA(insert OID = 125 (  box_overlap	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_overlap - ));
+DATA(insert OID = 125 (  box_overlap	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_overlap - ));
 DESCR("overlaps");
-DATA(insert OID = 126 (  box_ge			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_ge - ));
+DATA(insert OID = 126 (  box_ge			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_ge - ));
 DESCR("greater-than-or-equal by area");
-DATA(insert OID = 127 (  box_gt			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_gt - ));
+DATA(insert OID = 127 (  box_gt			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_gt - ));
 DESCR("greater-than by area");
-DATA(insert OID = 128 (  box_eq			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_eq - ));
+DATA(insert OID = 128 (  box_eq			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_eq - ));
 DESCR("equal by area");
-DATA(insert OID = 129 (  box_lt			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_lt - ));
+DATA(insert OID = 129 (  box_lt			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_lt - ));
 DESCR("less-than by area");
-DATA(insert OID = 130 (  box_le			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_le - ));
+DATA(insert OID = 130 (  box_le			   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_le - ));
 DESCR("less-than-or-equal by area");
-DATA(insert OID = 131 (  point_above	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_above - ));
+DATA(insert OID = 131 (  point_above	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_above - ));
 DESCR("is above");
-DATA(insert OID = 132 (  point_left		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_left - ));
+DATA(insert OID = 132 (  point_left		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_left - ));
 DESCR("is left of");
-DATA(insert OID = 133 (  point_right	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_right - ));
+DATA(insert OID = 133 (  point_right	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_right - ));
 DESCR("is right of");
-DATA(insert OID = 134 (  point_below	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_below - ));
+DATA(insert OID = 134 (  point_below	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_below - ));
 DESCR("is below");
-DATA(insert OID = 135 (  point_eq		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_eq - ));
+DATA(insert OID = 135 (  point_eq		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_eq - ));
 DESCR("same as");
-DATA(insert OID = 136 (  on_pb			   PGUID 12 f t t t 2 f 16 "600 603" 100 0 0 100	on_pb - ));
+DATA(insert OID = 136 (  on_pb			   PGUID 12 f t t t 2 f 16 "600 603" 100 0 0 100  on_pb - ));
 DESCR("point is inside");
 DATA(insert OID = 137 (  on_ppath		   PGUID 12 f t t t 2 f 16 "600 602" 100 0 0 100  on_ppath - ));
 DESCR("contained in");
@@ -289,109 +289,109 @@ DATA(insert OID = 138 (  box_center		   PGUID 12 f t t t 1 f 600 "603" 100 0 0 1
 DESCR("center of");
 DATA(insert OID = 139 (  areasel		   PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  areasel - ));
 DESCR("restriction selectivity for area-comparison operators");
-DATA(insert OID = 140 (  areajoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	areajoinsel - ));
+DATA(insert OID = 140 (  areajoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  areajoinsel - ));
 DESCR("join selectivity for area-comparison operators");
-DATA(insert OID = 141 (  int4mul		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4mul - ));
+DATA(insert OID = 141 (  int4mul		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4mul - ));
 DESCR("multiply");
 DATA(insert OID = 142 (  int4fac		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100  int4fac - ));
 DESCR("factorial");
-DATA(insert OID = 144 (  int4ne			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4ne - ));
+DATA(insert OID = 144 (  int4ne			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4ne - ));
 DESCR("not equal");
-DATA(insert OID = 145 (  int2ne			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2ne - ));
+DATA(insert OID = 145 (  int2ne			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2ne - ));
 DESCR("not equal");
-DATA(insert OID = 146 (  int2gt			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2gt - ));
+DATA(insert OID = 146 (  int2gt			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2gt - ));
 DESCR("greater-than");
-DATA(insert OID = 147 (  int4gt			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4gt - ));
+DATA(insert OID = 147 (  int4gt			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4gt - ));
 DESCR("greater-than");
-DATA(insert OID = 148 (  int2le			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2le - ));
+DATA(insert OID = 148 (  int2le			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 149 (  int4le			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4le - ));
+DATA(insert OID = 149 (  int4le			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 150 (  int4ge			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100	int4ge - ));
+DATA(insert OID = 150 (  int4ge			   PGUID 12 f t t t 2 f 16 "23 23" 100 0 0 100  int4ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 151 (  int2ge			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100	int2ge - ));
+DATA(insert OID = 151 (  int2ge			   PGUID 12 f t t t 2 f 16 "21 21" 100 0 0 100  int2ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 152 (  int2mul		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2mul - ));
+DATA(insert OID = 152 (  int2mul		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2mul - ));
 DESCR("multiply");
-DATA(insert OID = 153 (  int2div		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2div - ));
+DATA(insert OID = 153 (  int2div		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2div - ));
 DESCR("divide");
-DATA(insert OID = 154 (  int4div		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4div - ));
+DATA(insert OID = 154 (  int4div		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4div - ));
 DESCR("divide");
-DATA(insert OID = 155 (  int2mod		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2mod - ));
+DATA(insert OID = 155 (  int2mod		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2mod - ));
 DESCR("modulus");
-DATA(insert OID = 156 (  int4mod		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4mod - ));
+DATA(insert OID = 156 (  int4mod		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4mod - ));
 DESCR("modulus");
-DATA(insert OID = 157 (  textne			   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	textne - ));
+DATA(insert OID = 157 (  textne			   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  textne - ));
 DESCR("not equal");
-DATA(insert OID = 158 (  int24eq		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24eq - ));
+DATA(insert OID = 158 (  int24eq		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24eq - ));
 DESCR("equal");
-DATA(insert OID = 159 (  int42eq		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42eq - ));
+DATA(insert OID = 159 (  int42eq		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42eq - ));
 DESCR("equal");
-DATA(insert OID = 160 (  int24lt		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24lt - ));
+DATA(insert OID = 160 (  int24lt		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24lt - ));
 DESCR("less-than");
-DATA(insert OID = 161 (  int42lt		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42lt - ));
+DATA(insert OID = 161 (  int42lt		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42lt - ));
 DESCR("less-than");
-DATA(insert OID = 162 (  int24gt		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24gt - ));
+DATA(insert OID = 162 (  int24gt		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24gt - ));
 DESCR("greater-than");
-DATA(insert OID = 163 (  int42gt		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42gt - ));
+DATA(insert OID = 163 (  int42gt		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42gt - ));
 DESCR("greater-than");
-DATA(insert OID = 164 (  int24ne		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24ne - ));
+DATA(insert OID = 164 (  int24ne		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24ne - ));
 DESCR("not equal");
-DATA(insert OID = 165 (  int42ne		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42ne - ));
+DATA(insert OID = 165 (  int42ne		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42ne - ));
 DESCR("not equal");
-DATA(insert OID = 166 (  int24le		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24le - ));
+DATA(insert OID = 166 (  int24le		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 167 (  int42le		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42le - ));
+DATA(insert OID = 167 (  int42le		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 168 (  int24ge		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100	int24ge - ));
+DATA(insert OID = 168 (  int24ge		   PGUID 12 f t t t 2 f 16 "21 23" 100 0 0 100  int24ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 169 (  int42ge		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100	int42ge - ));
+DATA(insert OID = 169 (  int42ge		   PGUID 12 f t t t 2 f 16 "23 21" 100 0 0 100  int42ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 170 (  int24mul		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24mul - ));
+DATA(insert OID = 170 (  int24mul		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24mul - ));
 DESCR("multiply");
-DATA(insert OID = 171 (  int42mul		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42mul - ));
+DATA(insert OID = 171 (  int42mul		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42mul - ));
 DESCR("multiply");
-DATA(insert OID = 172 (  int24div		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24div - ));
+DATA(insert OID = 172 (  int24div		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24div - ));
 DESCR("divide");
-DATA(insert OID = 173 (  int42div		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42div - ));
+DATA(insert OID = 173 (  int42div		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42div - ));
 DESCR("divide");
-DATA(insert OID = 174 (  int24mod		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24mod - ));
+DATA(insert OID = 174 (  int24mod		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24mod - ));
 DESCR("modulus");
-DATA(insert OID = 175 (  int42mod		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42mod - ));
+DATA(insert OID = 175 (  int42mod		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42mod - ));
 DESCR("modulus");
-DATA(insert OID = 176 (  int2pl			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2pl - ));
+DATA(insert OID = 176 (  int2pl			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2pl - ));
 DESCR("add");
-DATA(insert OID = 177 (  int4pl			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4pl - ));
+DATA(insert OID = 177 (  int4pl			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4pl - ));
 DESCR("add");
-DATA(insert OID = 178 (  int24pl		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24pl - ));
+DATA(insert OID = 178 (  int24pl		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24pl - ));
 DESCR("add");
-DATA(insert OID = 179 (  int42pl		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42pl - ));
+DATA(insert OID = 179 (  int42pl		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42pl - ));
 DESCR("add");
-DATA(insert OID = 180 (  int2mi			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2mi - ));
+DATA(insert OID = 180 (  int2mi			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2mi - ));
 DESCR("subtract");
-DATA(insert OID = 181 (  int4mi			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4mi - ));
+DATA(insert OID = 181 (  int4mi			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4mi - ));
 DESCR("subtract");
-DATA(insert OID = 182 (  int24mi		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24mi - ));
+DATA(insert OID = 182 (  int24mi		   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24mi - ));
 DESCR("subtract");
-DATA(insert OID = 183 (  int42mi		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42mi - ));
+DATA(insert OID = 183 (  int42mi		   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42mi - ));
 DESCR("subtract");
-DATA(insert OID = 184 (  oideq			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oideq - ));
+DATA(insert OID = 184 (  oideq			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oideq - ));
 DESCR("equal");
-DATA(insert OID = 185 (  oidne			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oidne - ));
+DATA(insert OID = 185 (  oidne			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oidne - ));
 DESCR("not equal");
-DATA(insert OID = 186 (  box_same		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_same - ));
+DATA(insert OID = 186 (  box_same		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_same - ));
 DESCR("same as");
-DATA(insert OID = 187 (  box_contain	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_contain - ));
+DATA(insert OID = 187 (  box_contain	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_contain - ));
 DESCR("contains");
-DATA(insert OID = 188 (  box_left		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_left - ));
+DATA(insert OID = 188 (  box_left		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_left - ));
 DESCR("is left of");
-DATA(insert OID = 189 (  box_overleft	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_overleft - ));
+DATA(insert OID = 189 (  box_overleft	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_overleft - ));
 DESCR("overlaps, but does not extend to right of");
-DATA(insert OID = 190 (  box_overright	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_overright - ));
+DATA(insert OID = 190 (  box_overright	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_overright - ));
 DESCR("overlaps, but does not extend to left of");
-DATA(insert OID = 191 (  box_right		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_right - ));
+DATA(insert OID = 191 (  box_right		   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_right - ));
 DESCR("is right of");
-DATA(insert OID = 192 (  box_contained	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100	box_contained - ));
+DATA(insert OID = 192 (  box_contained	   PGUID 12 f t t t 2 f 16 "603 603" 100 0 0 100  box_contained - ));
 DESCR("contained in");
 DATA(insert OID = 193 (  rt_box_union	   PGUID 12 f t t t 2 f 603 "603 603" 100 0 0 100  rt_box_union - ));
 DESCR("r-tree");
@@ -501,77 +501,77 @@ DATA(insert OID = 242 (  reltimein		   PGUID 12 f t f t 1 f 703 "0" 100 0 0 100
 DESCR("(internal)");
 DATA(insert OID = 243 (  reltimeout		   PGUID 12 f t f t 1 f 23	"0" 100 0 0 100  reltimeout - ));
 DESCR("(internal)");
-DATA(insert OID = 244 (  timepl			   PGUID 12 f t f t 2 f 702 "702 703" 100 0 0 100  timepl - ));
+DATA(insert OID = 244 (  timepl			   PGUID 12 f t t t 2 f 702 "702 703" 100 0 0 100  timepl - ));
 DESCR("add");
-DATA(insert OID = 245 (  timemi			   PGUID 12 f t f t 2 f 702 "702 703" 100 0 0 100  timemi - ));
+DATA(insert OID = 245 (  timemi			   PGUID 12 f t t t 2 f 702 "702 703" 100 0 0 100  timemi - ));
 DESCR("subtract");
 DATA(insert OID = 246 (  tintervalin	   PGUID 12 f t f t 1 f 704 "0" 100 0 0 100  tintervalin - ));
 DESCR("(internal)");
 DATA(insert OID = 247 (  tintervalout	   PGUID 12 f t f t 1 f 23	"0" 100 0 0 100  tintervalout - ));
 DESCR("(internal)");
-DATA(insert OID = 248 (  intinterval	   PGUID 12 f t f t 2 f 16 "702 704" 100 0 0 100	intinterval - ));
+DATA(insert OID = 248 (  intinterval	   PGUID 12 f t f t 2 f 16 "702 704" 100 0 0 100  intinterval - ));
 DESCR("abstime in tinterval");
 DATA(insert OID = 249 (  tintervalrel	   PGUID 12 f t f t 1 f 703 "704" 100 0 0 100  tintervalrel - ));
 DESCR("");
 DATA(insert OID = 250 (  timenow		   PGUID 12 f t f t 0 f 702 "0" 100 0 0 100  timenow - ));
 DESCR("Current date and time (abstime)");
-DATA(insert OID = 251 (  abstimeeq		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimeeq - ));
+DATA(insert OID = 251 (  abstimeeq		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimeeq - ));
 DESCR("equal");
-DATA(insert OID = 252 (  abstimene		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimene - ));
+DATA(insert OID = 252 (  abstimene		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimene - ));
 DESCR("not equal");
-DATA(insert OID = 253 (  abstimelt		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimelt - ));
+DATA(insert OID = 253 (  abstimelt		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimelt - ));
 DESCR("less-than");
-DATA(insert OID = 254 (  abstimegt		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimegt - ));
+DATA(insert OID = 254 (  abstimegt		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimegt - ));
 DESCR("greater-than");
-DATA(insert OID = 255 (  abstimele		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimele - ));
+DATA(insert OID = 255 (  abstimele		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimele - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 256 (  abstimege		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100	abstimege - ));
+DATA(insert OID = 256 (  abstimege		   PGUID 12 f t f t 2 f 16 "702 702" 100 0 0 100  abstimege - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 257 (  reltimeeq		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimeeq - ));
+DATA(insert OID = 257 (  reltimeeq		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimeeq - ));
 DESCR("equal");
-DATA(insert OID = 258 (  reltimene		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimene - ));
+DATA(insert OID = 258 (  reltimene		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimene - ));
 DESCR("not equal");
-DATA(insert OID = 259 (  reltimelt		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimelt - ));
+DATA(insert OID = 259 (  reltimelt		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimelt - ));
 DESCR("less-than");
-DATA(insert OID = 260 (  reltimegt		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimegt - ));
+DATA(insert OID = 260 (  reltimegt		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimegt - ));
 DESCR("greater-than");
-DATA(insert OID = 261 (  reltimele		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimele - ));
+DATA(insert OID = 261 (  reltimele		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimele - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 262 (  reltimege		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100	reltimege - ));
+DATA(insert OID = 262 (  reltimege		   PGUID 12 f t t t 2 f 16 "703 703" 100 0 0 100  reltimege - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 263 (  tintervalsame	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalsame - ));
+DATA(insert OID = 263 (  tintervalsame	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalsame - ));
 DESCR("same as");
-DATA(insert OID = 264 (  tintervalct	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalct - ));
+DATA(insert OID = 264 (  tintervalct	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalct - ));
 DESCR("less-than");
-DATA(insert OID = 265 (  tintervalov	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalov - ));
+DATA(insert OID = 265 (  tintervalov	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalov - ));
 DESCR("overlaps");
-DATA(insert OID = 266 (  tintervalleneq    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervalleneq - ));
+DATA(insert OID = 266 (  tintervalleneq    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervalleneq - ));
 DESCR("length equal");
-DATA(insert OID = 267 (  tintervallenne    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervallenne - ));
+DATA(insert OID = 267 (  tintervallenne    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervallenne - ));
 DESCR("length not equal to");
-DATA(insert OID = 268 (  tintervallenlt    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervallenlt - ));
+DATA(insert OID = 268 (  tintervallenlt    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervallenlt - ));
 DESCR("length less-than");
-DATA(insert OID = 269 (  tintervallengt    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervallengt - ));
+DATA(insert OID = 269 (  tintervallengt    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervallengt - ));
 DESCR("length greater-than");
-DATA(insert OID = 270 (  tintervallenle    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervallenle - ));
+DATA(insert OID = 270 (  tintervallenle    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervallenle - ));
 DESCR("length less-than-or-equal");
-DATA(insert OID = 271 (  tintervallenge    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100	tintervallenge - ));
+DATA(insert OID = 271 (  tintervallenge    PGUID 12 f t f t 2 f 16 "704 703" 100 0 0 100  tintervallenge - ));
 DESCR("length greater-than-or-equal");
 DATA(insert OID = 272 (  tintervalstart    PGUID 12 f t f t 1 f 702 "704" 100 0 0 100  tintervalstart - ));
 DESCR("start of interval");
 DATA(insert OID = 273 (  tintervalend	   PGUID 12 f t f t 1 f 702 "704" 100 0 0 100  tintervalend - ));
 DESCR("");
-DATA(insert OID = 274 (  timeofday		   PGUID 12 f t f t 0 f 25 "0" 100 0 0 100	timeofday - ));
+DATA(insert OID = 274 (  timeofday		   PGUID 12 f t f t 0 f 25 "0" 100 0 0 100  timeofday - ));
 DESCR("Current date and time with microseconds");
-DATA(insert OID = 275 (  isfinite		   PGUID 12 f t f t 1 f 16 "702" 100 0 0 100	abstime_finite - ));
+DATA(insert OID = 275 (  isfinite		   PGUID 12 f t f t 1 f 16 "702" 100 0 0 100  abstime_finite - ));
 DESCR("");
 
 DATA(insert OID = 276 (  int2fac		   PGUID 12 f t t t 1 f 23 "21" 100 0 0 100  int2fac - ));
 DESCR("factorial");
 
-DATA(insert OID = 277 (  inter_sl		   PGUID 12 f t t t 2 f 16 "601 628" 100 0 0 100	inter_sl - ));
+DATA(insert OID = 277 (  inter_sl		   PGUID 12 f t t t 2 f 16 "601 628" 100 0 0 100  inter_sl - ));
 DESCR("");
-DATA(insert OID = 278 (  inter_lb		   PGUID 12 f t t t 2 f 16 "628 603" 100 0 0 100	inter_lb - ));
+DATA(insert OID = 278 (  inter_lb		   PGUID 12 f t t t 2 f 16 "628 603" 100 0 0 100  inter_lb - ));
 DESCR("");
 
 DATA(insert OID = 279 (  float48mul		   PGUID 12 f t t t 2 f 701 "700 701" 100 0 0 100  float48mul - ));
@@ -591,58 +591,58 @@ DESCR("add");
 DATA(insert OID = 286 (  float84mi		   PGUID 12 f t t t 2 f 701 "701 700" 100 0 0 100  float84mi - ));
 DESCR("subtract");
 
-DATA(insert OID = 287 (  float4eq		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4eq - ));
+DATA(insert OID = 287 (  float4eq		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4eq - ));
 DESCR("equal");
-DATA(insert OID = 288 (  float4ne		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4ne - ));
+DATA(insert OID = 288 (  float4ne		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4ne - ));
 DESCR("not equal");
-DATA(insert OID = 289 (  float4lt		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4lt - ));
+DATA(insert OID = 289 (  float4lt		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4lt - ));
 DESCR("less-than");
-DATA(insert OID = 290 (  float4le		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4le - ));
+DATA(insert OID = 290 (  float4le		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 291 (  float4gt		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4gt - ));
+DATA(insert OID = 291 (  float4gt		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4gt - ));
 DESCR("greater-than");
-DATA(insert OID = 292 (  float4ge		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100	float4ge - ));
+DATA(insert OID = 292 (  float4ge		   PGUID 12 f t t t 2 f 16 "700 700" 100 0 0 100  float4ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 293 (  float8eq		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8eq - ));
+DATA(insert OID = 293 (  float8eq		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8eq - ));
 DESCR("equal");
-DATA(insert OID = 294 (  float8ne		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8ne - ));
+DATA(insert OID = 294 (  float8ne		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8ne - ));
 DESCR("not equal");
-DATA(insert OID = 295 (  float8lt		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8lt - ));
+DATA(insert OID = 295 (  float8lt		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8lt - ));
 DESCR("less-than");
-DATA(insert OID = 296 (  float8le		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8le - ));
+DATA(insert OID = 296 (  float8le		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 297 (  float8gt		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8gt - ));
+DATA(insert OID = 297 (  float8gt		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8gt - ));
 DESCR("greater-than");
-DATA(insert OID = 298 (  float8ge		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100	float8ge - ));
+DATA(insert OID = 298 (  float8ge		   PGUID 12 f t t t 2 f 16 "701 701" 100 0 0 100  float8ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 299 (  float48eq		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48eq - ));
+DATA(insert OID = 299 (  float48eq		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48eq - ));
 DESCR("equal");
 
 /* OIDS 300 - 399 */
 
-DATA(insert OID = 300 (  float48ne		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48ne - ));
+DATA(insert OID = 300 (  float48ne		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48ne - ));
 DESCR("not equal");
-DATA(insert OID = 301 (  float48lt		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48lt - ));
+DATA(insert OID = 301 (  float48lt		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48lt - ));
 DESCR("less-than");
-DATA(insert OID = 302 (  float48le		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48le - ));
+DATA(insert OID = 302 (  float48le		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 303 (  float48gt		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48gt - ));
+DATA(insert OID = 303 (  float48gt		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48gt - ));
 DESCR("greater-than");
-DATA(insert OID = 304 (  float48ge		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100	float48ge - ));
+DATA(insert OID = 304 (  float48ge		   PGUID 12 f t t t 2 f 16 "700 701" 100 0 0 100  float48ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 305 (  float84eq		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84eq - ));
+DATA(insert OID = 305 (  float84eq		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84eq - ));
 DESCR("equal");
-DATA(insert OID = 306 (  float84ne		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84ne - ));
+DATA(insert OID = 306 (  float84ne		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84ne - ));
 DESCR("not equal");
-DATA(insert OID = 307 (  float84lt		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84lt - ));
+DATA(insert OID = 307 (  float84lt		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84lt - ));
 DESCR("less-than");
-DATA(insert OID = 308 (  float84le		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84le - ));
+DATA(insert OID = 308 (  float84le		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 309 (  float84gt		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84gt - ));
+DATA(insert OID = 309 (  float84gt		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84gt - ));
 DESCR("greater-than");
-DATA(insert OID = 310 (  float84ge		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100	float84ge - ));
+DATA(insert OID = 310 (  float84ge		   PGUID 12 f t t t 2 f 16 "701 700" 100 0 0 100  float84ge - ));
 DESCR("greater-than-or-equal");
 
 DATA(insert OID = 311 (  float8			   PGUID 12 f t t t 1 f 701 "700" 100 0 0 100  ftod - ));
@@ -653,7 +653,7 @@ DATA(insert OID = 313 (  int4			   PGUID 12 f t t t 1 f  23  "21" 100 0 0 100  i
 DESCR("convert int2 to int4");
 DATA(insert OID = 314 (  int2			   PGUID 12 f t t t 1 f  21  "23" 100 0 0 100  i4toi2 - ));
 DESCR("convert int4 to int2");
-DATA(insert OID = 315 (  int2vectoreq	   PGUID 12 f t t t 2 f  16  "22 22" 100 0 0 100	int2vectoreq - ));
+DATA(insert OID = 315 (  int2vectoreq	   PGUID 12 f t t t 2 f  16  "22 22" 100 0 0 100  int2vectoreq - ));
 DESCR("equal");
 DATA(insert OID = 316 (  float8			   PGUID 12 f t t t 1 f 701  "23" 100 0 0 100  i4tod - ));
 DESCR("convert int4 to float8");
@@ -664,21 +664,21 @@ DESCR("convert int4 to float4");
 DATA(insert OID = 319 (  int4			   PGUID 12 f t t t 1 f  23 "700" 100 0 0 100  ftoi4 - ));
 DESCR("convert float4 to int4");
 
-DATA(insert OID = 320 (  rtinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100	rtinsert - ));
+DATA(insert OID = 320 (  rtinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100  rtinsert - ));
 DESCR("r-tree(internal)");
 DATA(insert OID = 322 (  rtgettuple		   PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100  rtgettuple - ));
 DESCR("r-tree(internal)");
-DATA(insert OID = 323 (  rtbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	rtbuild - ));
+DATA(insert OID = 323 (  rtbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  rtbuild - ));
 DESCR("r-tree(internal)");
 DATA(insert OID = 324 (  rtbeginscan	   PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100  rtbeginscan - ));
 DESCR("r-tree(internal)");
-DATA(insert OID = 325 (  rtendscan		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	rtendscan - ));
+DATA(insert OID = 325 (  rtendscan		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  rtendscan - ));
 DESCR("r-tree(internal)");
-DATA(insert OID = 326 (  rtmarkpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	rtmarkpos - ));
+DATA(insert OID = 326 (  rtmarkpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  rtmarkpos - ));
 DESCR("r-tree(internal)");
-DATA(insert OID = 327 (  rtrestrpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	rtrestrpos - ));
+DATA(insert OID = 327 (  rtrestrpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  rtrestrpos - ));
 DESCR("r-tree(internal)");
-DATA(insert OID = 328 (  rtrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	rtrescan - ));
+DATA(insert OID = 328 (  rtrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  rtrescan - ));
 DESCR("r-tree(internal)");
 DATA(insert OID = 321 (  rtbulkdelete	   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  rtbulkdelete - ));
 DESCR("r-tree(internal)");
@@ -687,19 +687,19 @@ DESCR("r-tree(internal)");
 
 DATA(insert OID = 330 (  btgettuple		   PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100  btgettuple - ));
 DESCR("btree(internal)");
-DATA(insert OID = 331 (  btinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100	btinsert - ));
+DATA(insert OID = 331 (  btinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100  btinsert - ));
 DESCR("btree(internal)");
 DATA(insert OID = 333 (  btbeginscan	   PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100  btbeginscan - ));
 DESCR("btree(internal)");
-DATA(insert OID = 334 (  btrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	btrescan - ));
+DATA(insert OID = 334 (  btrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  btrescan - ));
 DESCR("btree(internal)");
-DATA(insert OID = 335 (  btendscan		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	btendscan - ));
+DATA(insert OID = 335 (  btendscan		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  btendscan - ));
 DESCR("btree(internal)");
-DATA(insert OID = 336 (  btmarkpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	btmarkpos - ));
+DATA(insert OID = 336 (  btmarkpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  btmarkpos - ));
 DESCR("btree(internal)");
-DATA(insert OID = 337 (  btrestrpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	btrestrpos - ));
+DATA(insert OID = 337 (  btrestrpos		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  btrestrpos - ));
 DESCR("btree(internal)");
-DATA(insert OID = 338 (  btbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	btbuild - ));
+DATA(insert OID = 338 (  btbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  btbuild - ));
 DESCR("btree(internal)");
 DATA(insert OID = 332 (  btbulkdelete	   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  btbulkdelete - ));
 DESCR("btree(internal)");
@@ -727,27 +727,27 @@ DESCR("(internal)");
 DATA(insert OID = 348 (  poly_out		   PGUID 12 f t t t 1 f 23	"0" 100 0 0 100  poly_out - ));
 DESCR("(internal)");
 
-DATA(insert OID = 350 (  btint2cmp		   PGUID 12 f t t t 2 f 23 "21 21" 100 0 0 100	btint2cmp - ));
+DATA(insert OID = 350 (  btint2cmp		   PGUID 12 f t t t 2 f 23 "21 21" 100 0 0 100  btint2cmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 351 (  btint4cmp		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	btint4cmp - ));
+DATA(insert OID = 351 (  btint4cmp		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  btint4cmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 842 (  btint8cmp		   PGUID 12 f t t t 2 f 23 "20 20" 100 0 0 100	btint8cmp - ));
+DATA(insert OID = 842 (  btint8cmp		   PGUID 12 f t t t 2 f 23 "20 20" 100 0 0 100  btint8cmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 354 (  btfloat4cmp	   PGUID 12 f t t t 2 f 23 "700 700" 100 0 0 100	btfloat4cmp - ));
+DATA(insert OID = 354 (  btfloat4cmp	   PGUID 12 f t t t 2 f 23 "700 700" 100 0 0 100  btfloat4cmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 355 (  btfloat8cmp	   PGUID 12 f t t t 2 f 23 "701 701" 100 0 0 100	btfloat8cmp - ));
+DATA(insert OID = 355 (  btfloat8cmp	   PGUID 12 f t t t 2 f 23 "701 701" 100 0 0 100  btfloat8cmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 356 (  btoidcmp		   PGUID 12 f t t t 2 f 23 "26 26" 100 0 0 100	btoidcmp - ));
+DATA(insert OID = 356 (  btoidcmp		   PGUID 12 f t t t 2 f 23 "26 26" 100 0 0 100  btoidcmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 404 (  btoidvectorcmp    PGUID 12 f t t t 2 f 23 "30 30" 100 0 0 100	btoidvectorcmp - ));
+DATA(insert OID = 404 (  btoidvectorcmp    PGUID 12 f t t t 2 f 23 "30 30" 100 0 0 100  btoidvectorcmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 357 (  btabstimecmp	   PGUID 12 f t f t 2 f 23 "702 702" 100 0 0 100	btabstimecmp - ));
+DATA(insert OID = 357 (  btabstimecmp	   PGUID 12 f t f t 2 f 23 "702 702" 100 0 0 100  btabstimecmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 358 (  btcharcmp		   PGUID 12 f t t t 2 f 23 "18 18" 100 0 0 100	btcharcmp - ));
+DATA(insert OID = 358 (  btcharcmp		   PGUID 12 f t t t 2 f 23 "18 18" 100 0 0 100  btcharcmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 359 (  btnamecmp		   PGUID 12 f t t t 2 f 23 "19 19" 100 0 0 100	btnamecmp - ));
+DATA(insert OID = 359 (  btnamecmp		   PGUID 12 f t t t 2 f 23 "19 19" 100 0 0 100  btnamecmp - ));
 DESCR("btree less-equal-greater");
-DATA(insert OID = 360 (  bttextcmp		   PGUID 12 f t t t 2 f 23 "25 25" 100 0 0 100	bttextcmp - ));
+DATA(insert OID = 360 (  bttextcmp		   PGUID 12 f t t t 2 f 23 "25 25" 100 0 0 100  bttextcmp - ));
 DESCR("btree less-equal-greater");
 
 DATA(insert OID = 361 (  lseg_distance	   PGUID 12 f t t t 2 f 701 "601 601" 100 0 0 100  lseg_distance - ));
@@ -766,15 +766,15 @@ DATA(insert OID = 367 (  close_pb		   PGUID 12 f t t t 2 f 600 "600 603" 100 0 0
 DESCR("closest point on box");
 DATA(insert OID = 368 (  close_sb		   PGUID 12 f t t t 2 f 600 "601 603" 100 0 0 100  close_sb - ));
 DESCR("closest point to line segment on box");
-DATA(insert OID = 369 (  on_ps			   PGUID 12 f t t t 2 f 16 "600 601" 100 0 0 100	on_ps - ));
+DATA(insert OID = 369 (  on_ps			   PGUID 12 f t t t 2 f 16 "600 601" 100 0 0 100  on_ps - ));
 DESCR("point contained in segment");
 DATA(insert OID = 370 (  path_distance	   PGUID 12 f t t t 2 f 701 "602 602" 100 0 0 100  path_distance - ));
 DESCR("distance between paths");
 DATA(insert OID = 371 (  dist_ppath		   PGUID 12 f t t t 2 f 701 "600 602" 100 0 0 100  dist_ppath - ));
 DESCR("distance between point and path");
-DATA(insert OID = 372 (  on_sb			   PGUID 12 f t t t 2 f 16 "601 603" 100 0 0 100	on_sb - ));
+DATA(insert OID = 372 (  on_sb			   PGUID 12 f t t t 2 f 16 "601 603" 100 0 0 100  on_sb - ));
 DESCR("contained in");
-DATA(insert OID = 373 (  inter_sb		   PGUID 12 f t t t 2 f 16 "601 603" 100 0 0 100	inter_sb - ));
+DATA(insert OID = 373 (  inter_sb		   PGUID 12 f t t t 2 f 16 "601 603" 100 0 0 100  inter_sb - ));
 DESCR("intersects?");
 
 /* OIDS 400 - 499 */
@@ -785,24 +785,24 @@ DATA(insert OID =  407 (  name			   PGUID 12 f t t t 1 f 19 "25" 100 0 0 100 tex
 DESCR("convert text to name");
 DATA(insert OID =  408 (  bpchar		   PGUID 12 f t t t 1 f 1042 "19" 100 0 0 100 name_bpchar - ));
 DESCR("convert name to char()");
-DATA(insert OID =  409 (  name			   PGUID 12 f t t t 1 f 19 "1042" 100 0 0 100	bpchar_name - ));
+DATA(insert OID =  409 (  name			   PGUID 12 f t t t 1 f 19 "1042" 100 0 0 100  bpchar_name - ));
 DESCR("convert char() to name");
 
 DATA(insert OID = 440 (  hashgettuple	   PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100  hashgettuple - ));
 DESCR("hash(internal)");
-DATA(insert OID = 441 (  hashinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100	hashinsert - ));
+DATA(insert OID = 441 (  hashinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100  hashinsert - ));
 DESCR("hash(internal)");
 DATA(insert OID = 443 (  hashbeginscan	   PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100  hashbeginscan - ));
 DESCR("hash(internal)");
-DATA(insert OID = 444 (  hashrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	hashrescan - ));
+DATA(insert OID = 444 (  hashrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  hashrescan - ));
 DESCR("hash(internal)");
-DATA(insert OID = 445 (  hashendscan	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	hashendscan - ));
+DATA(insert OID = 445 (  hashendscan	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  hashendscan - ));
 DESCR("hash(internal)");
-DATA(insert OID = 446 (  hashmarkpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	hashmarkpos - ));
+DATA(insert OID = 446 (  hashmarkpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  hashmarkpos - ));
 DESCR("hash(internal)");
-DATA(insert OID = 447 (  hashrestrpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	hashrestrpos - ));
+DATA(insert OID = 447 (  hashrestrpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  hashrestrpos - ));
 DESCR("hash(internal)");
-DATA(insert OID = 448 (  hashbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	hashbuild - ));
+DATA(insert OID = 448 (  hashbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  hashbuild - ));
 DESCR("hash(internal)");
 DATA(insert OID = 442 (  hashbulkdelete	   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  hashbulkdelete - ));
 DESCR("hash(internal)");
@@ -815,9 +815,9 @@ DATA(insert OID = 450 (  hashint4		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100
 DESCR("hash");
 DATA(insert OID = 949 (  hashint8		   PGUID 12 f t t t 1 f 23 "20" 100 0 0 100  hashint8 - ));
 DESCR("hash");
-DATA(insert OID = 451 (  hashfloat4		   PGUID 12 f t t t 1 f 23 "700" 100 0 0 100	hashfloat4 - ));
+DATA(insert OID = 451 (  hashfloat4		   PGUID 12 f t t t 1 f 23 "700" 100 0 0 100  hashfloat4 - ));
 DESCR("hash");
-DATA(insert OID = 452 (  hashfloat8		   PGUID 12 f t t t 1 f 23 "701" 100 0 0 100	hashfloat8 - ));
+DATA(insert OID = 452 (  hashfloat8		   PGUID 12 f t t t 1 f 23 "701" 100 0 0 100  hashfloat8 - ));
 DESCR("hash");
 DATA(insert OID = 453 (  hashoid		   PGUID 12 f t t t 1 f 23 "26" 100 0 0 100  hashoid - ));
 DESCR("hash");
@@ -825,62 +825,62 @@ DATA(insert OID = 454 (  hashchar		   PGUID 12 f t t t 1 f 23 "18" 100 0 0 100
 DESCR("hash");
 DATA(insert OID = 455 (  hashname		   PGUID 12 f t t t 1 f 23 "19" 100 0 0 100  hashname - ));
 DESCR("hash");
-DATA(insert OID = 456 (  hashvarlena	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	hashvarlena - ));
+DATA(insert OID = 456 (  hashvarlena	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  hashvarlena - ));
 DESCR("hash any varlena type");
 DATA(insert OID = 457 (  hashoidvector	   PGUID 12 f t t t 1 f 23 "30" 100 0 0 100  hashoidvector - ));
 DESCR("hash");
 DATA(insert OID = 399 (  hashmacaddr	   PGUID 12 f t t t 1 f 23 "829" 100 0 0 100  hashmacaddr - ));
 DESCR("hash");
-DATA(insert OID = 458 (  text_larger	   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	text_larger - ));
+DATA(insert OID = 458 (  text_larger	   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  text_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 459 (  text_smaller	   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	text_smaller - ));
+DATA(insert OID = 459 (  text_smaller	   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  text_smaller - ));
 DESCR("smaller of two");
 
-DATA(insert OID = 460 (  int8in			   PGUID 12 f t t t 1 f 20 "0" 100 0 0 100	int8in - ));
+DATA(insert OID = 460 (  int8in			   PGUID 12 f t t t 1 f 20 "0" 100 0 0 100  int8in - ));
 DESCR("(internal)");
-DATA(insert OID = 461 (  int8out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int8out - ));
+DATA(insert OID = 461 (  int8out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int8out - ));
 DESCR("(internal)");
 DATA(insert OID = 462 (  int8um			   PGUID 12 f t t t 1 f 20 "20" 100 0 0 100  int8um - ));
 DESCR("negate");
-DATA(insert OID = 463 (  int8pl			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8pl - ));
+DATA(insert OID = 463 (  int8pl			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8pl - ));
 DESCR("add");
-DATA(insert OID = 464 (  int8mi			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8mi - ));
+DATA(insert OID = 464 (  int8mi			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8mi - ));
 DESCR("subtract");
-DATA(insert OID = 465 (  int8mul		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8mul - ));
+DATA(insert OID = 465 (  int8mul		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8mul - ));
 DESCR("multiply");
-DATA(insert OID = 466 (  int8div		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8div - ));
+DATA(insert OID = 466 (  int8div		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8div - ));
 DESCR("divide");
-DATA(insert OID = 467 (  int8eq			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8eq - ));
+DATA(insert OID = 467 (  int8eq			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8eq - ));
 DESCR("equal");
-DATA(insert OID = 468 (  int8ne			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8ne - ));
+DATA(insert OID = 468 (  int8ne			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8ne - ));
 DESCR("not equal");
-DATA(insert OID = 469 (  int8lt			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8lt - ));
+DATA(insert OID = 469 (  int8lt			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8lt - ));
 DESCR("less-than");
-DATA(insert OID = 470 (  int8gt			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8gt - ));
+DATA(insert OID = 470 (  int8gt			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8gt - ));
 DESCR("greater-than");
-DATA(insert OID = 471 (  int8le			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8le - ));
+DATA(insert OID = 471 (  int8le			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 472 (  int8ge			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100	int8ge - ));
+DATA(insert OID = 472 (  int8ge			   PGUID 12 f t t t 2 f 16 "20 20" 100 0 0 100  int8ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 474 (  int84eq		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84eq - ));
+DATA(insert OID = 474 (  int84eq		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84eq - ));
 DESCR("equal");
-DATA(insert OID = 475 (  int84ne		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84ne - ));
+DATA(insert OID = 475 (  int84ne		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84ne - ));
 DESCR("not equal");
-DATA(insert OID = 476 (  int84lt		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84lt - ));
+DATA(insert OID = 476 (  int84lt		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84lt - ));
 DESCR("less-than");
-DATA(insert OID = 477 (  int84gt		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84gt - ));
+DATA(insert OID = 477 (  int84gt		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84gt - ));
 DESCR("greater-than");
-DATA(insert OID = 478 (  int84le		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84le - ));
+DATA(insert OID = 478 (  int84le		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 479 (  int84ge		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100	int84ge - ));
+DATA(insert OID = 479 (  int84ge		   PGUID 12 f t t t 2 f 16 "20 23" 100 0 0 100  int84ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 480 (  int4			   PGUID 12 f t t t 1 f  23 "20" 100 0 0 100	int84 - ));
+DATA(insert OID = 480 (  int4			   PGUID 12 f t t t 1 f  23 "20" 100 0 0 100  int84 - ));
 DESCR("convert int8 to int4");
-DATA(insert OID = 481 (  int8			   PGUID 12 f t t t 1 f  20 "23" 100 0 0 100	int48 - ));
+DATA(insert OID = 481 (  int8			   PGUID 12 f t t t 1 f  20 "23" 100 0 0 100  int48 - ));
 DESCR("convert int4 to int8");
-DATA(insert OID = 482 (  float8			   PGUID 12 f t t t 1 f 701 "20" 100 0 0 100	i8tod - ));
+DATA(insert OID = 482 (  float8			   PGUID 12 f t t t 1 f 701 "20" 100 0 0 100  i8tod - ));
 DESCR("convert int8 to float8");
 DATA(insert OID = 483 (  int8			   PGUID 12 f t t t 1 f  20 "701" 100 0 0 100  dtoi8 - ));
 DESCR("convert float8 to int8");
@@ -889,66 +889,66 @@ DESCR("convert float8 to int8");
 
 /* OIDS 600 - 699 */
 
-DATA(insert OID = 1285 (  int4notin		   PGUID 12 f t f t 2 f 16 "23 25" 100 0 0 100	int4notin - ));
+DATA(insert OID = 1285 (  int4notin		   PGUID 12 f t f t 2 f 16 "23 25" 100 0 0 100  int4notin - ));
 DESCR("not in");
-DATA(insert OID = 1286 (  oidnotin		   PGUID 12 f t f t 2 f 16 "26 25" 100 0 0 100	oidnotin - ));
+DATA(insert OID = 1286 (  oidnotin		   PGUID 12 f t f t 2 f 16 "26 25" 100 0 0 100  oidnotin - ));
 DESCR("not in");
-DATA(insert OID = 1287 (  int44in		   PGUID 12 f t t t 1 f 22 "0" 100 0 0 100	int44in - ));
+DATA(insert OID = 1287 (  int44in		   PGUID 12 f t t t 1 f 22 "0" 100 0 0 100  int44in - ));
 DESCR("(internal)");
-DATA(insert OID = 653 (  int44out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	int44out - ));
+DATA(insert OID = 653 (  int44out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  int44out - ));
 DESCR("(internal)");
-DATA(insert OID = 655 (  namelt			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	namelt - ));
+DATA(insert OID = 655 (  namelt			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  namelt - ));
 DESCR("less-than");
-DATA(insert OID = 656 (  namele			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	namele - ));
+DATA(insert OID = 656 (  namele			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  namele - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 657 (  namegt			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	namegt - ));
+DATA(insert OID = 657 (  namegt			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  namegt - ));
 DESCR("greater-than");
-DATA(insert OID = 658 (  namege			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	namege - ));
+DATA(insert OID = 658 (  namege			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  namege - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 659 (  namene			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100	namene - ));
+DATA(insert OID = 659 (  namene			   PGUID 12 f t t t 2 f 16 "19 19" 100 0 0 100  namene - ));
 DESCR("not equal");
 
-DATA(insert OID = 668 (  bpchar			   PGUID 12 f t t t 2 f 1042 "1042 23" 100 0 0 100	bpchar - ));
+DATA(insert OID = 668 (  bpchar			   PGUID 12 f t t t 2 f 1042 "1042 23" 100 0 0 100  bpchar - ));
 DESCR("adjust char() to typmod length");
-DATA(insert OID = 669 (  varchar		   PGUID 12 f t t t 2 f 1043 "1043 23" 100 0 0 100	varchar - ));
+DATA(insert OID = 669 (  varchar		   PGUID 12 f t t t 2 f 1043 "1043 23" 100 0 0 100  varchar - ));
 DESCR("adjust varchar() to typmod length");
 
 DATA(insert OID = 676 (  mktinterval	   PGUID 12 f t f t 2 f 704 "702 702" 100 0 0 100 mktinterval - ));
 DESCR("convert to tinterval");
-DATA(insert OID = 619 (  oidvectorne	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectorne - ));
+DATA(insert OID = 619 (  oidvectorne	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectorne - ));
 DESCR("not equal");
-DATA(insert OID = 677 (  oidvectorlt	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectorlt - ));
+DATA(insert OID = 677 (  oidvectorlt	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectorlt - ));
 DESCR("less-than");
-DATA(insert OID = 678 (  oidvectorle	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectorle - ));
+DATA(insert OID = 678 (  oidvectorle	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectorle - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 679 (  oidvectoreq	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectoreq - ));
+DATA(insert OID = 679 (  oidvectoreq	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectoreq - ));
 DESCR("equal");
-DATA(insert OID = 680 (  oidvectorge	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectorge - ));
+DATA(insert OID = 680 (  oidvectorge	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectorge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 681 (  oidvectorgt	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100	oidvectorgt - ));
+DATA(insert OID = 681 (  oidvectorgt	   PGUID 12 f t t t 2 f 16 "30 30" 100 0 0 100  oidvectorgt - ));
 DESCR("greater-than");
 
 /* OIDS 700 - 799 */
-DATA(insert OID = 710 (  getpgusername	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100	current_user - ));
+DATA(insert OID = 710 (  getpgusername	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100  current_user - ));
 DESCR("deprecated -- use current_user");
 DATA(insert OID = 711 (  userfntest		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100  userfntest - ));
 DESCR("");
-DATA(insert OID = 713 (  oidrand		   PGUID 12 f t f t 2 f 16 "26 23" 100 0 0 100	oidrand - ));
+DATA(insert OID = 713 (  oidrand		   PGUID 12 f t f t 2 f 16 "26 23" 100 0 0 100  oidrand - ));
 DESCR("random");
 DATA(insert OID = 715 (  oidsrand		   PGUID 12 f t f t 1 f 16 "23" 100 0 0 100  oidsrand - ));
 DESCR("seed random number generator");
-DATA(insert OID = 716 (  oidlt			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oidlt - ));
+DATA(insert OID = 716 (  oidlt			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oidlt - ));
 DESCR("less-than");
-DATA(insert OID = 717 (  oidle			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oidle - ));
+DATA(insert OID = 717 (  oidle			   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oidle - ));
 DESCR("less-than-or-equal");
 
 DATA(insert OID = 720 (  octet_length	   PGUID 12 f t t t 1 f 23 "17" 100 0 0 100  byteaoctetlen - ));
 DESCR("octet length");
-DATA(insert OID = 721 (  get_byte		   PGUID 12 f t t t 2 f 23 "17 23" 100 0 0 100	byteaGetByte - ));
+DATA(insert OID = 721 (  get_byte		   PGUID 12 f t t t 2 f 23 "17 23" 100 0 0 100  byteaGetByte - ));
 DESCR("");
 DATA(insert OID = 722 (  set_byte		   PGUID 12 f t t t 3 f 17 "17 23 23" 100 0 0 100  byteaSetByte - ));
 DESCR("");
-DATA(insert OID = 723 (  get_bit		   PGUID 12 f t t t 2 f 23 "17 23" 100 0 0 100	byteaGetBit - ));
+DATA(insert OID = 723 (  get_bit		   PGUID 12 f t t t 2 f 23 "17 23" 100 0 0 100  byteaGetBit - ));
 DESCR("");
 DATA(insert OID = 724 (  set_bit		   PGUID 12 f t t t 3 f 17 "17 23 23" 100 0 0 100  byteaSetBit - ));
 DESCR("");
@@ -964,87 +964,87 @@ DESCR("distance between");
 DATA(insert OID = 729 (  poly_distance	   PGUID 12 f t t t 2 f 701 "604 604" 100 0 0 100  poly_distance - ));
 DESCR("distance between");
 
-DATA(insert OID = 740 (  text_lt		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	text_lt - ));
+DATA(insert OID = 740 (  text_lt		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  text_lt - ));
 DESCR("less-than");
-DATA(insert OID = 741 (  text_le		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	text_le - ));
+DATA(insert OID = 741 (  text_le		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  text_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 742 (  text_gt		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	text_gt - ));
+DATA(insert OID = 742 (  text_gt		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  text_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 743 (  text_ge		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	text_ge - ));
+DATA(insert OID = 743 (  text_ge		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  text_ge - ));
 DESCR("greater-than-or-equal");
 
 DATA(insert OID = 744 (  array_eq		   PGUID 12 f t t t 2 f 16 "0 0" 100 0 0 100 array_eq -));
 DESCR("array equal");
 
-DATA(insert OID = 745 (  current_user	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100	current_user - ));
+DATA(insert OID = 745 (  current_user	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100  current_user - ));
 DESCR("current user name");
-DATA(insert OID = 746 (  session_user	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100	session_user - ));
+DATA(insert OID = 746 (  session_user	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100  session_user - ));
 DESCR("session user name");
 
 DATA(insert OID = 747 (  array_dims		   PGUID 12 f t t t 1 f 25 "0" 100 0 0 100 array_dims -));
 DESCR("array dimensions");
-DATA(insert OID = 750 (  array_in		   PGUID 12 f t t t 3 f 23 "0 26 23" 100 0 0 100	array_in - ));
+DATA(insert OID = 750 (  array_in		   PGUID 12 f t t t 3 f 23 "0 26 23" 100 0 0 100  array_in - ));
 DESCR("array");
-DATA(insert OID = 751 (  array_out		   PGUID 12 f t t t 2 f 23 "0 26" 100 0 0 100	array_out - ));
+DATA(insert OID = 751 (  array_out		   PGUID 12 f t t t 2 f 23 "0 26" 100 0 0 100  array_out - ));
 DESCR("array");
 
 DATA(insert OID = 760 (  smgrin			   PGUID 12 f t f t 1 f 210 "0" 100 0 0 100  smgrin - ));
 DESCR("storage manager(internal)");
 DATA(insert OID = 761 (  smgrout		   PGUID 12 f t f t 1 f 23	"0" 100 0 0 100  smgrout - ));
 DESCR("storage manager(internal)");
-DATA(insert OID = 762 (  smgreq			   PGUID 12 f t f t 2 f 16 "210 210" 100 0 0 100	smgreq - ));
+DATA(insert OID = 762 (  smgreq			   PGUID 12 f t f t 2 f 16 "210 210" 100 0 0 100  smgreq - ));
 DESCR("storage manager");
-DATA(insert OID = 763 (  smgrne			   PGUID 12 f t f t 2 f 16 "210 210" 100 0 0 100	smgrne - ));
+DATA(insert OID = 763 (  smgrne			   PGUID 12 f t f t 2 f 16 "210 210" 100 0 0 100  smgrne - ));
 DESCR("storage manager");
 
 DATA(insert OID = 764 (  lo_import		   PGUID 12 f t f t 1 f 26 "25" 100 0 0 100  lo_import - ));
 DESCR("large object import");
-DATA(insert OID = 765 (  lo_export		   PGUID 12 f t f t 2 f 23 "26 25" 100 0 0 100	lo_export - ));
+DATA(insert OID = 765 (  lo_export		   PGUID 12 f t f t 2 f 23 "26 25" 100 0 0 100  lo_export - ));
 DESCR("large object export");
 
 DATA(insert OID = 766 (  int4inc		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100  int4inc - ));
 DESCR("increment");
-DATA(insert OID = 768 (  int4larger		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4larger - ));
+DATA(insert OID = 768 (  int4larger		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4larger - ));
 DESCR("larger of two");
-DATA(insert OID = 769 (  int4smaller	   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4smaller - ));
+DATA(insert OID = 769 (  int4smaller	   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4smaller - ));
 DESCR("smaller of two");
-DATA(insert OID = 770 (  int2larger		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2larger - ));
+DATA(insert OID = 770 (  int2larger		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2larger - ));
 DESCR("larger of two");
-DATA(insert OID = 771 (  int2smaller	   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2smaller - ));
+DATA(insert OID = 771 (  int2smaller	   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2smaller - ));
 DESCR("smaller of two");
 
 DATA(insert OID = 774 (  gistgettuple	   PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100  gistgettuple - ));
 DESCR("gist(internal)");
-DATA(insert OID = 775 (  gistinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100	gistinsert - ));
+DATA(insert OID = 775 (  gistinsert		   PGUID 12 f t f t 5 f 23 "0 0 0 0 0" 100 0 0 100  gistinsert - ));
 DESCR("gist(internal)");
 DATA(insert OID = 777 (  gistbeginscan	   PGUID 12 f t f t 4 f 23 "0 0 0 0" 100 0 0 100  gistbeginscan - ));
 DESCR("gist(internal)");
-DATA(insert OID = 778 (  gistrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	gistrescan - ));
+DATA(insert OID = 778 (  gistrescan		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  gistrescan - ));
 DESCR("gist(internal)");
-DATA(insert OID = 779 (  gistendscan	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	gistendscan - ));
+DATA(insert OID = 779 (  gistendscan	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  gistendscan - ));
 DESCR("gist(internal)");
-DATA(insert OID = 780 (  gistmarkpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	gistmarkpos - ));
+DATA(insert OID = 780 (  gistmarkpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  gistmarkpos - ));
 DESCR("gist(internal)");
-DATA(insert OID = 781 (  gistrestrpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	gistrestrpos - ));
+DATA(insert OID = 781 (  gistrestrpos	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100  gistrestrpos - ));
 DESCR("gist(internal)");
-DATA(insert OID = 782 (  gistbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100	gistbuild - ));
+DATA(insert OID = 782 (  gistbuild		   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  gistbuild - ));
 DESCR("gist(internal)");
 DATA(insert OID = 776 (  gistbulkdelete	   PGUID 12 f t f t 3 f 23 "0 0 0" 100 0 0 100  gistbulkdelete - ));
 DESCR("gist(internal)");
 DATA(insert OID = 772 (  gistcostestimate  PGUID 12 f t f t 8 f 0 "0 0 0 0 0 0 0 0" 100 0 0 100  gistcostestimate - ));
 DESCR("gist(internal)");
 
-DATA(insert OID = 784 (  tintervaleq	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervaleq - ));
+DATA(insert OID = 784 (  tintervaleq	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervaleq - ));
 DESCR("equal");
-DATA(insert OID = 785 (  tintervalne	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalne - ));
+DATA(insert OID = 785 (  tintervalne	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalne - ));
 DESCR("not equal");
-DATA(insert OID = 786 (  tintervallt	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervallt - ));
+DATA(insert OID = 786 (  tintervallt	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervallt - ));
 DESCR("less-than");
-DATA(insert OID = 787 (  tintervalgt	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalgt - ));
+DATA(insert OID = 787 (  tintervalgt	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalgt - ));
 DESCR("greater-than");
-DATA(insert OID = 788 (  tintervalle	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalle - ));
+DATA(insert OID = 788 (  tintervalle	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalle - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 789 (  tintervalge	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100	tintervalge - ));
+DATA(insert OID = 789 (  tintervalge	   PGUID 12 f t f t 2 f 16 "704 704" 100 0 0 100  tintervalge - ));
 DESCR("greater-than-or-equal");
 
 /* OIDS 800 - 899 */
@@ -1056,9 +1056,9 @@ DESCR("convert text to int2");
 DATA(insert OID = 819 (  int4			   PGUID 12 f t t t 1 f 23 "25" 100 0 0 100  text_int4 -));
 DESCR("convert text to int4");
 
-DATA(insert OID = 838 (  float8			   PGUID 12 f t t t 1 f 701 "25" 100 0 0 100	text_float8 -));
+DATA(insert OID = 838 (  float8			   PGUID 12 f t t t 1 f 701 "25" 100 0 0 100  text_float8 -));
 DESCR("convert text to float8");
-DATA(insert OID = 839 (  float4			   PGUID 12 f t t t 1 f 700 "25" 100 0 0 100	text_float4 -));
+DATA(insert OID = 839 (  float4			   PGUID 12 f t t t 1 f 700 "25" 100 0 0 100  text_float4 -));
 DESCR("convert text to float4");
 DATA(insert OID = 840 (  text			   PGUID 12 f t t t 1 f  25 "701" 100 0 0 100  float8_text -));
 DESCR("convert float8 to text");
@@ -1079,22 +1079,22 @@ DESCR("matches LIKE expression");
 DATA(insert OID =  851 (  textnlike		   PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100 textnlike - ));
 DESCR("does not match LIKE expression");
 
-DATA(insert OID =  852 (  int48eq		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48eq - ));
+DATA(insert OID =  852 (  int48eq		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48eq - ));
 DESCR("equal");
-DATA(insert OID =  853 (  int48ne		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48ne - ));
+DATA(insert OID =  853 (  int48ne		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48ne - ));
 DESCR("not equal");
-DATA(insert OID =  854 (  int48lt		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48lt - ));
+DATA(insert OID =  854 (  int48lt		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48lt - ));
 DESCR("less-than");
-DATA(insert OID =  855 (  int48gt		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48gt - ));
+DATA(insert OID =  855 (  int48gt		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48gt - ));
 DESCR("greater-than");
-DATA(insert OID =  856 (  int48le		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48le - ));
+DATA(insert OID =  856 (  int48le		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID =  857 (  int48ge		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100	int48ge - ));
+DATA(insert OID =  857 (  int48ge		   PGUID 12 f t t t 2 f 16 "23 20" 100 0 0 100  int48ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID =  858 (  namelike		   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	namelike - ));
+DATA(insert OID =  858 (  namelike		   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  namelike - ));
 DESCR("matches LIKE expression");
-DATA(insert OID =  859 (  namenlike		   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	namenlike - ));
+DATA(insert OID =  859 (  namenlike		   PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  namenlike - ));
 DESCR("does not match LIKE expression");
 
 DATA(insert OID =  860 (  bpchar		   PGUID 12 f t t t 1 f 1042 "18" 100 0 0 100  char_bpchar - ));
@@ -1102,25 +1102,23 @@ DESCR("convert char to char()");
 DATA(insert OID =  861 (  char			   PGUID 12 f t t t 1 f 18 "1042" 100 0 0 100  bpchar_char - ));
 DESCR("convert char() to char");
 
-DATA(insert OID =  862 (  int4_mul_cash		   PGUID 12 f t t t 2 f 790 "23 790" 100 0 0 100	int4_mul_cash - ));
+DATA(insert OID =  862 (  int4_mul_cash		   PGUID 12 f t t t 2 f 790 "23 790" 100 0 0 100  int4_mul_cash - ));
 DESCR("multiply");
-DATA(insert OID =  863 (  int2_mul_cash		   PGUID 12 f t t t 2 f 790 "21 790" 100 0 0 100	int2_mul_cash - ));
+DATA(insert OID =  863 (  int2_mul_cash		   PGUID 12 f t t t 2 f 790 "21 790" 100 0 0 100  int2_mul_cash - ));
 DESCR("multiply");
-DATA(insert OID =  864 (  cash_mul_int4		   PGUID 12 f t t t 2 f 790 "790 23" 100 0 0 100	cash_mul_int4 - ));
+DATA(insert OID =  864 (  cash_mul_int4		   PGUID 12 f t t t 2 f 790 "790 23" 100 0 0 100  cash_mul_int4 - ));
 DESCR("multiply");
-DATA(insert OID =  865 (  cash_div_int4		   PGUID 12 f t t t 2 f 790 "790 23" 100 0 0 100	cash_div_int4 - ));
+DATA(insert OID =  865 (  cash_div_int4		   PGUID 12 f t t t 2 f 790 "790 23" 100 0 0 100  cash_div_int4 - ));
 DESCR("divide");
-DATA(insert OID =  866 (  cash_mul_int2		   PGUID 12 f t t t 2 f 790 "790 21" 100 0 0 100	cash_mul_int2 - ));
+DATA(insert OID =  866 (  cash_mul_int2		   PGUID 12 f t t t 2 f 790 "790 21" 100 0 0 100  cash_mul_int2 - ));
 DESCR("multiply");
-DATA(insert OID =  867 (  cash_div_int2		   PGUID 12 f t t t 2 f 790 "790 21" 100 0 0 100	cash_div_int2 - ));
+DATA(insert OID =  867 (  cash_div_int2		   PGUID 12 f t t t 2 f 790 "790 21" 100 0 0 100  cash_div_int2 - ));
 DESCR("divide");
 
 DATA(insert OID =  886 (  cash_in		   PGUID 12 f t t t 1 f 790 "0" 100 0 0 100  cash_in - ));
 DESCR("(internal)");
 DATA(insert OID =  887 (  cash_out		   PGUID 12 f t t t 1 f  23 "0" 100 0 0 100  cash_out - ));
 DESCR("(internal)");
-DATA(insert OID =  1273 (  cash_words  PGUID 12 f t t t 1 f  25 "790" 100 0 0 100  cash_words - ));
-DESCR("output amount as words");
 DATA(insert OID =  888 (  cash_eq		   PGUID 12 f t t t 2 f  16 "790 790" 100 0 0 100  cash_eq - ));
 DESCR("equal");
 DATA(insert OID =  889 (  cash_ne		   PGUID 12 f t t t 2 f  16 "790 790" 100 0 0 100  cash_ne - ));
@@ -1137,32 +1135,33 @@ DATA(insert OID =  894 (  cash_pl		   PGUID 12 f t t t 2 f 790 "790 790" 100 0 0
 DESCR("add");
 DATA(insert OID =  895 (  cash_mi		   PGUID 12 f t t t 2 f 790 "790 790" 100 0 0 100  cash_mi - ));
 DESCR("subtract");
-DATA(insert OID =  896 (  cash_mul_flt8		   PGUID 12 f t t t 2 f 790 "790 701" 100 0 0 100  cash_mul_flt8 - ));
+DATA(insert OID =  896 (  cash_mul_flt8	   PGUID 12 f t t t 2 f 790 "790 701" 100 0 0 100  cash_mul_flt8 - ));
 DESCR("multiply");
-DATA(insert OID =  897 (  cash_div_flt8		   PGUID 12 f t t t 2 f 790 "790 701" 100 0 0 100  cash_div_flt8 - ));
+DATA(insert OID =  897 (  cash_div_flt8	   PGUID 12 f t t t 2 f 790 "790 701" 100 0 0 100  cash_div_flt8 - ));
 DESCR("divide");
 DATA(insert OID =  898 (  cashlarger	   PGUID 12 f t t t 2 f 790 "790 790" 100 0 0 100  cashlarger - ));
 DESCR("larger of two");
 DATA(insert OID =  899 (  cashsmaller	   PGUID 12 f t t t 2 f 790 "790 790" 100 0 0 100  cashsmaller - ));
 DESCR("smaller of two");
-
 DATA(insert OID =  919 (  flt8_mul_cash    PGUID 12 f t t t 2 f 790 "701 790" 100 0 0 100  flt8_mul_cash - ));
 DESCR("multiply");
+DATA(insert OID =  935 (  cash_words	   PGUID 12 f t t t 1 f  25 "790" 100 0 0 100  cash_words - ));
+DESCR("output amount as words");
 
 /* OIDS 900 - 999 */
 
-DATA(insert OID = 940 (  mod			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2mod - ));
+DATA(insert OID = 940 (  mod			   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2mod - ));
 DESCR("modulus");
-DATA(insert OID = 941 (  mod			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4mod - ));
+DATA(insert OID = 941 (  mod			   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4mod - ));
 DESCR("modulus");
-DATA(insert OID = 942 (  mod			   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100	int24mod - ));
+DATA(insert OID = 942 (  mod			   PGUID 12 f t t t 2 f 23 "21 23" 100 0 0 100  int24mod - ));
 DESCR("modulus");
-DATA(insert OID = 943 (  mod			   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100	int42mod - ));
+DATA(insert OID = 943 (  mod			   PGUID 12 f t t t 2 f 23 "23 21" 100 0 0 100  int42mod - ));
 DESCR("modulus");
 
-DATA(insert OID = 945 (  int8mod		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8mod - ));
+DATA(insert OID = 945 (  int8mod		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8mod - ));
 DESCR("modulus");
-DATA(insert OID = 947 (  mod			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8mod - ));
+DATA(insert OID = 947 (  mod			   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8mod - ));
 DESCR("modulus");
 
 DATA(insert OID = 944 (  char			   PGUID 12 f t t t 1 f 18 "25" 100 0 0 100  text_char - ));
@@ -1175,13 +1174,13 @@ DESCR("bool is true (not false or unknown)");
 DATA(insert OID = 951 (  isfalse		   PGUID 12 f t t f 1 f 16 "16" 100 0 0 100  isfalse - ));
 DESCR("bool is false (not true or unknown)");
 
-DATA(insert OID = 952 (  lo_open		   PGUID 12 f t f t 2 f 23 "26 23" 100 0 0 100	lo_open - ));
+DATA(insert OID = 952 (  lo_open		   PGUID 12 f t f t 2 f 23 "26 23" 100 0 0 100  lo_open - ));
 DESCR("large object open");
 DATA(insert OID = 953 (  lo_close		   PGUID 12 f t f t 1 f 23 "23" 100 0 0 100  lo_close - ));
 DESCR("large object close");
-DATA(insert OID = 954 (  loread			   PGUID 12 f t f t 2 f 17 "23 23" 100 0 0 100	loread - ));
+DATA(insert OID = 954 (  loread			   PGUID 12 f t f t 2 f 17 "23 23" 100 0 0 100  loread - ));
 DESCR("large object read");
-DATA(insert OID = 955 (  lowrite		   PGUID 12 f t f t 2 f 23 "23 17" 100 0 0 100	lowrite - ));
+DATA(insert OID = 955 (  lowrite		   PGUID 12 f t f t 2 f 23 "23 17" 100 0 0 100  lowrite - ));
 DESCR("large object write");
 DATA(insert OID = 956 (  lo_lseek		   PGUID 12 f t f t 3 f 23 "23 23 23" 100 0 0 100  lo_lseek - ));
 DESCR("large object seek");
@@ -1201,9 +1200,9 @@ DESCR("closest point to line segment on line");
 DATA(insert OID = 963 (  close_lb		   PGUID 12 f t t t 2 f 600 "628 603" 100 0 0 100  close_lb - ));
 DESCR("closest point to line on box");
 
-DATA(insert OID = 964 (  lo_unlink		   PGUID 12 f t f t 1 f  23 "26" 100 0 0 100	lo_unlink - ));
+DATA(insert OID = 964 (  lo_unlink		   PGUID 12 f t f t 1 f  23 "26" 100 0 0 100  lo_unlink - ));
 DESCR("large object unlink(delete)");
-DATA(insert OID = 972 (  regproctooid	   PGUID 12 f t t t 1 f  26 "24" 100 0 0 100	regproctooid - ));
+DATA(insert OID = 972 (  regproctooid	   PGUID 12 f t t t 1 f  26 "24" 100 0 0 100  regproctooid - ));
 DESCR("get oid for regproc");
 
 DATA(insert OID = 973 (  path_inter		   PGUID 12 f t t t 2 f  16 "602 602" 100 0 0 100  path_inter - ));
@@ -1220,23 +1219,23 @@ DATA(insert OID = 980 (  box_intersect	   PGUID 12 f t t t 2 f 603 "603 603" 100
 DESCR("box intersection (another box)");
 DATA(insert OID = 981 (  diagonal		   PGUID 12 f t t t 1 f 601 "603" 100 0 0 100  box_diagonal - ));
 DESCR("box diagonal");
-DATA(insert OID = 982 (  path_n_lt		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100	path_n_lt - ));
+DATA(insert OID = 982 (  path_n_lt		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100  path_n_lt - ));
 DESCR("less-than");
-DATA(insert OID = 983 (  path_n_gt		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100	path_n_gt - ));
+DATA(insert OID = 983 (  path_n_gt		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100  path_n_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 984 (  path_n_eq		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100	path_n_eq - ));
+DATA(insert OID = 984 (  path_n_eq		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100  path_n_eq - ));
 DESCR("equal");
-DATA(insert OID = 985 (  path_n_le		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100	path_n_le - ));
+DATA(insert OID = 985 (  path_n_le		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100  path_n_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 986 (  path_n_ge		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100	path_n_ge - ));
+DATA(insert OID = 986 (  path_n_ge		   PGUID 12 f t t t 2 f 16 "602 602" 100 0 0 100  path_n_ge - ));
 DESCR("greater-than-or-equal");
 DATA(insert OID = 987 (  path_length	   PGUID 12 f t t t 1 f 701 "602" 100 0 0 100  path_length - ));
 DESCR("sum of path segments");
-DATA(insert OID = 988 (  point_ne		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_ne - ));
+DATA(insert OID = 988 (  point_ne		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_ne - ));
 DESCR("not equal");
-DATA(insert OID = 989 (  point_vert		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_vert - ));
+DATA(insert OID = 989 (  point_vert		   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_vert - ));
 DESCR("vertically aligned?");
-DATA(insert OID = 990 (  point_horiz	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100	point_horiz - ));
+DATA(insert OID = 990 (  point_horiz	   PGUID 12 f t t t 2 f 16 "600 600" 100 0 0 100  point_horiz - ));
 DESCR("horizontally aligned?");
 DATA(insert OID = 991 (  point_distance    PGUID 12 f t t t 2 f 701 "600 600" 100 0 0 100  point_distance - ));
 DESCR("distance between");
@@ -1244,141 +1243,141 @@ DATA(insert OID = 992 (  slope			   PGUID 12 f t t t 2 f 701 "600 600" 100 0 0 1
 DESCR("slope between points");
 DATA(insert OID = 993 (  lseg			   PGUID 12 f t t t 2 f 601 "600 600" 100 0 0 100  lseg_construct - ));
 DESCR("convert points to line segment");
-DATA(insert OID = 994 (  lseg_intersect    PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100	lseg_intersect - ));
+DATA(insert OID = 994 (  lseg_intersect    PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100  lseg_intersect - ));
 DESCR("intersect?");
-DATA(insert OID = 995 (  lseg_parallel	   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100	lseg_parallel - ));
+DATA(insert OID = 995 (  lseg_parallel	   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100  lseg_parallel - ));
 DESCR("parallel?");
-DATA(insert OID = 996 (  lseg_perp		   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100	lseg_perp - ));
+DATA(insert OID = 996 (  lseg_perp		   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100  lseg_perp - ));
 DESCR("perpendicular?");
-DATA(insert OID = 997 (  lseg_vertical	   PGUID 12 f t t t 1 f 16 "601" 100 0 0 100	lseg_vertical - ));
+DATA(insert OID = 997 (  lseg_vertical	   PGUID 12 f t t t 1 f 16 "601" 100 0 0 100  lseg_vertical - ));
 DESCR("vertical?");
-DATA(insert OID = 998 (  lseg_horizontal   PGUID 12 f t t t 1 f 16 "601" 100 0 0 100	lseg_horizontal - ));
+DATA(insert OID = 998 (  lseg_horizontal   PGUID 12 f t t t 1 f 16 "601" 100 0 0 100  lseg_horizontal - ));
 DESCR("horizontal?");
-DATA(insert OID = 999 (  lseg_eq		   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100	lseg_eq - ));
+DATA(insert OID = 999 (  lseg_eq		   PGUID 12 f t t t 2 f 16 "601 601" 100 0 0 100  lseg_eq - ));
 DESCR("equal");
 
-DATA(insert OID =  748 (  date			   PGUID 12 f t f t 1 f 1082 "25" 100 0 0 100 text_date - ));
+DATA(insert OID =  748 (  date			   PGUID 12 f t t t 1 f 1082 "25" 100 0 0 100 text_date - ));
 DESCR("convert text to date");
-DATA(insert OID =  749 (  text			   PGUID 12 f t f t 1 f 25 "1082" 100 0 0 100 date_text - ));
+DATA(insert OID =  749 (  text			   PGUID 12 f t t t 1 f 25 "1082" 100 0 0 100 date_text - ));
 DESCR("convert date to text");
-DATA(insert OID =  837 (  time			   PGUID 12 f t f t 1 f 1083 "25" 100 0 0 100 text_time - ));
+DATA(insert OID =  837 (  time			   PGUID 12 f t t t 1 f 1083 "25" 100 0 0 100 text_time - ));
 DESCR("convert text to time");
-DATA(insert OID =  948 (  text			   PGUID 12 f t f t 1 f 25 "1083" 100 0 0 100 time_text - ));
+DATA(insert OID =  948 (  text			   PGUID 12 f t t t 1 f 25 "1083" 100 0 0 100 time_text - ));
 DESCR("convert time to text");
-DATA(insert OID =  938 (  timetz		   PGUID 12 f t f t 1 f 1266 "25" 100 0 0 100 text_timetz - ));
+DATA(insert OID =  938 (  timetz		   PGUID 12 f t t t 1 f 1266 "25" 100 0 0 100 text_timetz - ));
 DESCR("convert text to timetz");
-DATA(insert OID =  939 (  text			   PGUID 12 f t f t 1 f 25 "1266" 100 0 0 100 timetz_text - ));
+DATA(insert OID =  939 (  text			   PGUID 12 f t t t 1 f 25 "1266" 100 0 0 100 timetz_text - ));
 DESCR("convert timetz to text");
 
 /* OIDS 1000 - 1999 */
 
-DATA(insert OID = 1026 (  timezone		   PGUID 12 f t f t 2 f 25 "1186 1184" 100 0 0 100	timestamp_izone - ));
+DATA(insert OID = 1026 (  timezone		   PGUID 12 f t t t 2 f 25 "1186 1184" 100 0 0 100  timestamptz_izone - ));
 DESCR("time zone");
 
-DATA(insert OID = 1029 (  nullvalue		   PGUID 12 f t t f 1 f 16 "0" 100 0 0 100	nullvalue - ));
+DATA(insert OID = 1029 (  nullvalue		   PGUID 12 f t t f 1 f 16 "0" 100 0 0 100  nullvalue - ));
 DESCR("(internal)");
-DATA(insert OID = 1030 (  nonnullvalue	   PGUID 12 f t t f 1 f 16 "0" 100 0 0 100	nonnullvalue - ));
+DATA(insert OID = 1030 (  nonnullvalue	   PGUID 12 f t t f 1 f 16 "0" 100 0 0 100  nonnullvalue - ));
 DESCR("(internal)");
-DATA(insert OID = 1031 (  aclitemin		   PGUID 12 f t f t 1 f 1033 "0" 100 0 0 100	aclitemin - ));
+DATA(insert OID = 1031 (  aclitemin		   PGUID 12 f t f t 1 f 1033 "0" 100 0 0 100  aclitemin - ));
 DESCR("(internal)");
 DATA(insert OID = 1032 (  aclitemout	   PGUID 12 f t f t 1 f 23 "1033" 100 0 0 100  aclitemout - ));
 DESCR("(internal)");
-DATA(insert OID = 1035 (  aclinsert		   PGUID 12 f t f t 2 f 1034 "1034 1033" 100 0 0 100	aclinsert - ));
+DATA(insert OID = 1035 (  aclinsert		   PGUID 12 f t f t 2 f 1034 "1034 1033" 100 0 0 100  aclinsert - ));
 DESCR("add/update ACL item");
-DATA(insert OID = 1036 (  aclremove		   PGUID 12 f t f t 2 f 1034 "1034 1033" 100 0 0 100	aclremove - ));
+DATA(insert OID = 1036 (  aclremove		   PGUID 12 f t f t 2 f 1034 "1034 1033" 100 0 0 100  aclremove - ));
 DESCR("remove ACL item");
-DATA(insert OID = 1037 (  aclcontains	   PGUID 12 f t f t 2 f 16 "1034 1033" 100 0 0 100	aclcontains - ));
+DATA(insert OID = 1037 (  aclcontains	   PGUID 12 f t f t 2 f 16 "1034 1033" 100 0 0 100  aclcontains - ));
 DESCR("does ACL contain item?");
 DATA(insert OID = 1038 (  seteval		   PGUID 12 f t f t 1 t 23 "26" 100 0 0 100  seteval - ));
 DESCR("internal function supporting PostQuel-style sets");
 DATA(insert OID = 1044 (  bpcharin		   PGUID 12 f t t t 3 f 1042 "0 26 23" 100 0 0 100 bpcharin - ));
 DESCR("(internal)");
-DATA(insert OID = 1045 (  bpcharout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	bpcharout - ));
+DATA(insert OID = 1045 (  bpcharout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  bpcharout - ));
 DESCR("(internal)");
 DATA(insert OID = 1046 (  varcharin		   PGUID 12 f t t t 3 f 1043 "0 26 23" 100 0 0 100 varcharin - ));
 DESCR("(internal)");
-DATA(insert OID = 1047 (  varcharout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	varcharout - ));
+DATA(insert OID = 1047 (  varcharout	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  varcharout - ));
 DESCR("(internal)");
-DATA(insert OID = 1048 (  bpchareq		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpchareq - ));
+DATA(insert OID = 1048 (  bpchareq		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpchareq - ));
 DESCR("equal");
-DATA(insert OID = 1049 (  bpcharlt		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpcharlt - ));
+DATA(insert OID = 1049 (  bpcharlt		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpcharlt - ));
 DESCR("less-than");
-DATA(insert OID = 1050 (  bpcharle		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpcharle - ));
+DATA(insert OID = 1050 (  bpcharle		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpcharle - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1051 (  bpchargt		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpchargt - ));
+DATA(insert OID = 1051 (  bpchargt		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpchargt - ));
 DESCR("greater-than");
-DATA(insert OID = 1052 (  bpcharge		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpcharge - ));
+DATA(insert OID = 1052 (  bpcharge		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpcharge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1053 (  bpcharne		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100	bpcharne - ));
+DATA(insert OID = 1053 (  bpcharne		   PGUID 12 f t t t 2 f 16 "1042 1042" 100 0 0 100  bpcharne - ));
 DESCR("not equal");
-DATA(insert OID = 1070 (  varchareq		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varchareq - ));
+DATA(insert OID = 1070 (  varchareq		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varchareq - ));
 DESCR("equal");
-DATA(insert OID = 1071 (  varcharlt		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varcharlt - ));
+DATA(insert OID = 1071 (  varcharlt		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varcharlt - ));
 DESCR("less-than");
-DATA(insert OID = 1072 (  varcharle		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varcharle - ));
+DATA(insert OID = 1072 (  varcharle		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varcharle - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1073 (  varchargt		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varchargt - ));
+DATA(insert OID = 1073 (  varchargt		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varchargt - ));
 DESCR("greater-than");
-DATA(insert OID = 1074 (  varcharge		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varcharge - ));
+DATA(insert OID = 1074 (  varcharge		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varcharge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1075 (  varcharne		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100	varcharne - ));
+DATA(insert OID = 1075 (  varcharne		   PGUID 12 f t t t 2 f 16 "1043 1043" 100 0 0 100  varcharne - ));
 DESCR("not equal");
-DATA(insert OID = 1078 (  bpcharcmp		   PGUID 12 f t t t 2 f 23 "1042 1042" 100 0 0 100	bpcharcmp - ));
+DATA(insert OID = 1078 (  bpcharcmp		   PGUID 12 f t t t 2 f 23 "1042 1042" 100 0 0 100  bpcharcmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 1079 (  varcharcmp	   PGUID 12 f t t t 2 f 23 "1043 1043" 100 0 0 100	varcharcmp - ));
+DATA(insert OID = 1079 (  varcharcmp	   PGUID 12 f t t t 2 f 23 "1043 1043" 100 0 0 100  varcharcmp - ));
 DESCR("less-equal-greater");
 DATA(insert OID = 1080 (  hashbpchar	   PGUID 12 f t t t 1 f 23 "1042" 100 0 0 100  hashbpchar - ));
 DESCR("hash");
 DATA(insert OID = 1081 (  format_type	   PGUID 12 f t t f 2 f 25 "26 23" 100 0 0 100 format_type - ));
 DESCR("format a type oid and atttypmod to canonical SQL");
-DATA(insert OID = 1084 (  date_in		   PGUID 12 f t f t 1 f 1082 "0" 100 0 0 100	date_in - ));
+DATA(insert OID = 1084 (  date_in		   PGUID 12 f t f t 1 f 1082 "0" 100 0 0 100  date_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1085 (  date_out		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	date_out - ));
+DATA(insert OID = 1085 (  date_out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  date_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1086 (  date_eq		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_eq - ));
+DATA(insert OID = 1086 (  date_eq		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_eq - ));
 DESCR("equal");
-DATA(insert OID = 1087 (  date_lt		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_lt - ));
+DATA(insert OID = 1087 (  date_lt		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_lt - ));
 DESCR("less-than");
-DATA(insert OID = 1088 (  date_le		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_le - ));
+DATA(insert OID = 1088 (  date_le		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1089 (  date_gt		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_gt - ));
+DATA(insert OID = 1089 (  date_gt		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1090 (  date_ge		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_ge - ));
+DATA(insert OID = 1090 (  date_ge		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1091 (  date_ne		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100	date_ne - ));
+DATA(insert OID = 1091 (  date_ne		   PGUID 12 f t t t 2 f 16 "1082 1082" 100 0 0 100  date_ne - ));
 DESCR("not equal");
-DATA(insert OID = 1092 (  date_cmp		   PGUID 12 f t t t 2 f 23 "1082 1082" 100 0 0 100	date_cmp - ));
+DATA(insert OID = 1092 (  date_cmp		   PGUID 12 f t t t 2 f 23 "1082 1082" 100 0 0 100  date_cmp - ));
 DESCR("less-equal-greater");
 
 /* OIDS 1100 - 1199 */
 
-DATA(insert OID = 1102 (  time_lt		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_lt - ));
+DATA(insert OID = 1102 (  time_lt		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_lt - ));
 DESCR("less-than");
-DATA(insert OID = 1103 (  time_le		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_le - ));
+DATA(insert OID = 1103 (  time_le		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1104 (  time_gt		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_gt - ));
+DATA(insert OID = 1104 (  time_gt		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1105 (  time_ge		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_ge - ));
+DATA(insert OID = 1105 (  time_ge		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1106 (  time_ne		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_ne - ));
+DATA(insert OID = 1106 (  time_ne		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_ne - ));
 DESCR("not equal");
-DATA(insert OID = 1107 (  time_cmp		   PGUID 12 f t t t 2 f 23 "1083 1083" 100 0 0 100	time_cmp - ));
+DATA(insert OID = 1107 (  time_cmp		   PGUID 12 f t t t 2 f 23 "1083 1083" 100 0 0 100  time_cmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 1138 (  date_larger	   PGUID 12 f t t t 2 f 1082 "1082 1082" 100 0 0 100	date_larger - ));
+DATA(insert OID = 1138 (  date_larger	   PGUID 12 f t t t 2 f 1082 "1082 1082" 100 0 0 100  date_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1139 (  date_smaller	   PGUID 12 f t t t 2 f 1082 "1082 1082" 100 0 0 100	date_smaller - ));
+DATA(insert OID = 1139 (  date_smaller	   PGUID 12 f t t t 2 f 1082 "1082 1082" 100 0 0 100  date_smaller - ));
 DESCR("smaller of two");
-DATA(insert OID = 1140 (  date_mi		   PGUID 12 f t t t 2 f 23 "1082 1082" 100 0 0 100	date_mi - ));
+DATA(insert OID = 1140 (  date_mi		   PGUID 12 f t t t 2 f 23 "1082 1082" 100 0 0 100  date_mi - ));
 DESCR("subtract");
-DATA(insert OID = 1141 (  date_pli		   PGUID 12 f t t t 2 f 1082 "1082 23" 100 0 0 100	date_pli - ));
+DATA(insert OID = 1141 (  date_pli		   PGUID 12 f t t t 2 f 1082 "1082 23" 100 0 0 100  date_pli - ));
 DESCR("add");
-DATA(insert OID = 1142 (  date_mii		   PGUID 12 f t t t 2 f 1082 "1082 23" 100 0 0 100	date_mii - ));
+DATA(insert OID = 1142 (  date_mii		   PGUID 12 f t t t 2 f 1082 "1082 23" 100 0 0 100  date_mii - ));
 DESCR("subtract");
-DATA(insert OID = 1143 (  time_in		   PGUID 12 f t f t 1 f 1083 "0" 100 0 0 100	time_in - ));
+DATA(insert OID = 1143 (  time_in		   PGUID 12 f t f t 1 f 1083 "0" 100 0 0 100  time_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1144 (  time_out		   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	time_out - ));
+DATA(insert OID = 1144 (  time_out		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  time_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1145 (  time_eq		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100	time_eq - ));
+DATA(insert OID = 1145 (  time_eq		   PGUID 12 f t t t 2 f 16 "1083 1083" 100 0 0 100  time_eq - ));
 DESCR("equal");
 
 DATA(insert OID = 1146 (  circle_add_pt    PGUID 12 f t t t 2 f 718 "718 600" 100 0 0 100  circle_add_pt - ));
@@ -1390,92 +1389,92 @@ DESCR("multiply");
 DATA(insert OID = 1149 (  circle_div_pt    PGUID 12 f t t t 2 f 718 "718 600" 100 0 0 100  circle_div_pt - ));
 DESCR("divide");
 
-DATA(insert OID = 1150 (  timestamp_in	   PGUID 12 f t f t 1 f 1184 "0" 100 0 0 100	timestamp_in - ));
+DATA(insert OID = 1150 (  timestamptz_in   PGUID 12 f t f t 1 f 1184 "0" 100 0 0 100  timestamptz_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1151 (  timestamp_out    PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	timestamp_out - ));
+DATA(insert OID = 1151 (  timestamptz_out  PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  timestamptz_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1152 (  timestamp_eq	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_eq - ));
+DATA(insert OID = 1152 (  timestamptz_eq   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_eq - ));
 DESCR("equal");
-DATA(insert OID = 1153 (  timestamp_ne	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_ne - ));
+DATA(insert OID = 1153 (  timestamptz_ne   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_ne - ));
 DESCR("not equal");
-DATA(insert OID = 1154 (  timestamp_lt	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_lt - ));
+DATA(insert OID = 1154 (  timestamptz_lt   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_lt - ));
 DESCR("less-than");
-DATA(insert OID = 1155 (  timestamp_le	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_le - ));
+DATA(insert OID = 1155 (  timestamptz_le   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1156 (  timestamp_ge	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_ge - ));
+DATA(insert OID = 1156 (  timestamptz_ge   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1157 (  timestamp_gt	   PGUID 12 f t f t 2 f 16 "1184 1184" 100 0 0 100	timestamp_gt - ));
+DATA(insert OID = 1157 (  timestamptz_gt   PGUID 12 f t t t 2 f 16 "1184 1184" 100 0 0 100  timestamp_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1159 (  timezone		   PGUID 12 f t f t 2 f 25 "25 1184" 100 0 0 100  timestamp_zone - ));
+DATA(insert OID = 1159 (  timezone		   PGUID 12 f t f t 2 f 25 "25 1184" 100 0 0 100  timestamptz_zone - ));
 DESCR("time zone");
 
-DATA(insert OID = 1160 (  interval_in	   PGUID 12 f t f t 1 f 1186 "0" 100 0 0 100	interval_in - ));
+DATA(insert OID = 1160 (  interval_in	   PGUID 12 f t f t 1 f 1186 "0" 100 0 0 100  interval_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1161 (  interval_out	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	interval_out - ));
+DATA(insert OID = 1161 (  interval_out	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  interval_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1162 (  interval_eq	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_eq - ));
+DATA(insert OID = 1162 (  interval_eq	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_eq - ));
 DESCR("equal");
-DATA(insert OID = 1163 (  interval_ne	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_ne - ));
+DATA(insert OID = 1163 (  interval_ne	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_ne - ));
 DESCR("not equal");
-DATA(insert OID = 1164 (  interval_lt	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_lt - ));
+DATA(insert OID = 1164 (  interval_lt	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_lt - ));
 DESCR("less-than");
-DATA(insert OID = 1165 (  interval_le	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_le - ));
+DATA(insert OID = 1165 (  interval_le	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1166 (  interval_ge	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_ge - ));
+DATA(insert OID = 1166 (  interval_ge	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1167 (  interval_gt	   PGUID 12 f t f t 2 f 16 "1186 1186" 100 0 0 100	interval_gt - ));
+DATA(insert OID = 1167 (  interval_gt	   PGUID 12 f t t t 2 f 16 "1186 1186" 100 0 0 100  interval_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1168 (  interval_um	   PGUID 12 f t f t 1 f 1186 "1186" 100 0 0 100  interval_um - ));
+DATA(insert OID = 1168 (  interval_um	   PGUID 12 f t t t 1 f 1186 "1186" 100 0 0 100  interval_um - ));
 DESCR("subtract");
-DATA(insert OID = 1169 (  interval_pl	   PGUID 12 f t f t 2 f 1186 "1186 1186" 100 0 0 100	interval_pl - ));
+DATA(insert OID = 1169 (  interval_pl	   PGUID 12 f t t t 2 f 1186 "1186 1186" 100 0 0 100  interval_pl - ));
 DESCR("add");
-DATA(insert OID = 1170 (  interval_mi	   PGUID 12 f t f t 2 f 1186 "1186 1186" 100 0 0 100	interval_mi - ));
+DATA(insert OID = 1170 (  interval_mi	   PGUID 12 f t t t 2 f 1186 "1186 1186" 100 0 0 100  interval_mi - ));
 DESCR("subtract");
-DATA(insert OID = 1171 (  date_part		   PGUID 12 f t f t 2 f  701 "25 1184" 100 0 0 100	timestamp_part - ));
-DESCR("extract field from timestamp");
-DATA(insert OID = 1172 (  date_part		   PGUID 12 f t f t 2 f  701 "25 1186" 100 0 0 100	interval_part - ));
+DATA(insert OID = 1171 (  date_part		   PGUID 12 f t t t 2 f  701 "25 1184" 100 0 0 100  timestamptz_part - ));
+DESCR("extract field from timestamp with time zone");
+DATA(insert OID = 1172 (  date_part		   PGUID 12 f t t t 2 f  701 "25 1186" 100 0 0 100  interval_part - ));
 DESCR("extract field from interval");
 
-DATA(insert OID = 1173 (  timestamp		   PGUID 12 f t f t 1 f 1184 "702" 100 0 0 100	abstime_timestamp - ));
-DESCR("convert abstime to timestamp");
-DATA(insert OID = 1174 (  timestamp		   PGUID 12 f t f t 1 f 1184 "1082" 100 0 0 100  date_timestamp - ));
-DESCR("convert date to timestamp");
-DATA(insert OID = 1176 (  timestamp		   PGUID 12 f t f t 2 f 1184 "1082 1083" 100 0 0 100	datetime_timestamp - ));
-DESCR("convert date and time to timestamp");
-DATA(insert OID = 1177 (  interval		   PGUID 12 f t f t 1 f 1186 "703" 100 0 0 100	reltime_interval - ));
+DATA(insert OID = 1173 (  timestamptz	   PGUID 12 f t f t 1 f 1184 "702" 100 0 0 100  abstime_timestamptz - ));
+DESCR("convert abstime to timestamp with time zone");
+DATA(insert OID = 1174 (  timestamptz	   PGUID 12 f t f t 1 f 1184 "1082" 100 0 0 100  date_timestamptz - ));
+DESCR("convert date to timestamp with time zone");
+DATA(insert OID = 1176 (  timestamptz	   PGUID 14 f t f t 2 f 1184 "1082 1083" 100 0 0 100  "select timestamptz($1 + $2)" - ));
+DESCR("convert date and time to timestamp with time zone");
+DATA(insert OID = 1177 (  interval		   PGUID 12 f t t t 1 f 1186 "703" 100 0 0 100  reltime_interval - ));
 DESCR("convert reltime to interval");
-DATA(insert OID = 1178 (  date			   PGUID 12 f t f t 1 f 1082 "1184" 100 0 0 100  timestamp_date - ));
-DESCR("convert timestamp to date");
-DATA(insert OID = 1179 (  date			   PGUID 12 f t f t 1 f 1082 "702" 100 0 0 100	abstime_date - ));
+DATA(insert OID = 1178 (  date			   PGUID 12 f t f t 1 f 1082 "1184" 100 0 0 100  timestamptz_date - ));
+DESCR("convert timestamp with time zone to date");
+DATA(insert OID = 1179 (  date			   PGUID 12 f t f t 1 f 1082 "702" 100 0 0 100  abstime_date - ));
 DESCR("convert abstime to date");
-DATA(insert OID = 1180 (  abstime		   PGUID 12 f t f t 1 f  702 "1184" 100 0 0 100  timestamp_abstime - ));
-DESCR("convert timestamp to abstime");
+DATA(insert OID = 1180 (  abstime		   PGUID 12 f t f t 1 f  702 "1184" 100 0 0 100  timestamptz_abstime - ));
+DESCR("convert timestamp with time zone to abstime");
 DATA(insert OID = 1181 (  age			   PGUID 12 f t f t 1 f 23 "28" 100 0 0 100  xid_age - ));
 DESCR("age of a transaction ID, in transactions before current transaction");
 
-DATA(insert OID = 1188 (  timestamp_mi		PGUID 12 f t f t 2 f 1186 "1184 1184" 100 0 0 100  timestamp_mi - ));
+DATA(insert OID = 1188 (  timestamptz_mi   PGUID 12 f t t t 2 f 1186 "1184 1184" 100 0 0 100  timestamp_mi - ));
 DESCR("subtract");
-DATA(insert OID = 1189 (  timestamp_pl_span PGUID 12 f t f t 2 f 1184 "1184 1186" 100 0 0 100  timestamp_pl_span - ));
+DATA(insert OID = 1189 (  timestamptz_pl_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100  timestamp_pl_span - ));
 DESCR("plus");
-DATA(insert OID = 1190 (  timestamp_mi_span PGUID 12 f t f t 2 f 1184 "1184 1186" 100 0 0 100  timestamp_mi_span - ));
+DATA(insert OID = 1190 (  timestamptz_mi_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100  timestamp_mi_span - ));
 DESCR("minus");
-DATA(insert OID = 1191 (  timestamp			PGUID 12 f t f t 1 f 1184 "25" 100 0 0 100	text_timestamp - ));
-DESCR("convert text to timestamp");
-DATA(insert OID = 1192 (  text				PGUID 12 f t f t 1 f	 25 "1184" 100 0 0 100	timestamp_text - ));
+DATA(insert OID = 1191 (  timestamptz		PGUID 12 f t t t 1 f 1184 "25" 100 0 0 100  text_timestamptz - ));
+DESCR("convert text to timestamp with time zone");
+DATA(insert OID = 1192 (  text				PGUID 12 f t t t 1 f	 25 "1184" 100 0 0 100  timestamptz_text - ));
 DESCR("convert timestamp to text");
-DATA(insert OID = 1193 (  text				PGUID 12 f t f t 1 f	 25 "1186" 100 0 0 100	interval_text - ));
+DATA(insert OID = 1193 (  text				PGUID 12 f t t t 1 f	 25 "1186" 100 0 0 100  interval_text - ));
 DESCR("convert interval to text");
-DATA(insert OID = 1194 (  reltime			PGUID 12 f t f t 1 f	703 "1186" 100 0 0 100	interval_reltime - ));
+DATA(insert OID = 1194 (  reltime			PGUID 12 f t t t 1 f	703 "1186" 100 0 0 100  interval_reltime - ));
 DESCR("convert interval to reltime");
-DATA(insert OID = 1195 (  timestamp_smaller PGUID 12 f t f t 2 f 1184 "1184 1184" 100 0 0 100  timestamp_smaller - ));
+DATA(insert OID = 1195 (  timestamptz_smaller PGUID 12 f t t t 2 f 1184 "1184 1184" 100 0 0 100  timestamp_smaller - ));
 DESCR("smaller of two");
-DATA(insert OID = 1196 (  timestamp_larger	PGUID 12 f t f t 2 f 1184 "1184 1184" 100 0 0 100  timestamp_larger - ));
+DATA(insert OID = 1196 (  timestamptz_larger  PGUID 12 f t t t 2 f 1184 "1184 1184" 100 0 0 100  timestamp_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1197 (  interval_smaller	PGUID 12 f t f t 2 f 1186 "1186 1186" 100 0 0 100  interval_smaller - ));
+DATA(insert OID = 1197 (  interval_smaller	PGUID 12 f t t t 2 f 1186 "1186 1186" 100 0 0 100  interval_smaller - ));
 DESCR("smaller of two");
-DATA(insert OID = 1198 (  interval_larger	PGUID 12 f t f t 2 f 1186 "1186 1186" 100 0 0 100  interval_larger - ));
+DATA(insert OID = 1198 (  interval_larger	PGUID 12 f t t t 2 f 1186 "1186 1186" 100 0 0 100  interval_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1199 (  age				PGUID 12 f t f t 2 f 1186 "1184 1184" 100 0 0 100  timestamp_age - ));
+DATA(insert OID = 1199 (  age				PGUID 12 f t t t 2 f 1186 "1184 1184" 100 0 0 100  timestamptz_age - ));
 DESCR("date difference preserving months and years");
 
 /* OIDS 1200 - 1299 */
@@ -1488,9 +1487,9 @@ DESCR("get description for object id and catalog name");
 DATA(insert OID = 1216 (  col_description	PGUID 14 f t f t 2 f	25 "26 23" 100 0 0 100  "select description from pg_description where objoid = $1 and classoid = (select oid from pg_class where relname = \'pg_class\') and objsubid = $2" - ));
 DESCR("get description for table column");
 
-DATA(insert OID = 1217 (  date_trunc	   PGUID 12 f t f t 2 f 1184 "25 1184" 100 0 0 100	timestamp_trunc - ));
-DESCR("truncate timestamp to specified units");
-DATA(insert OID = 1218 (  date_trunc	   PGUID 12 f t f t 2 f 1186 "25 1186" 100 0 0 100	interval_trunc - ));
+DATA(insert OID = 1217 (  date_trunc	   PGUID 12 f t t t 2 f 1184 "25 1184" 100 0 0 100  timestamptz_trunc - ));
+DESCR("truncate timestamp with time zone to specified units");
+DATA(insert OID = 1218 (  date_trunc	   PGUID 12 f t t t 2 f 1186 "25 1186" 100 0 0 100  interval_trunc - ));
 DESCR("truncate interval to specified units");
 
 DATA(insert OID = 1219 (  int8inc		   PGUID 12 f t t t 1 f 20 "20" 100 0 0 100  int8inc - ));
@@ -1498,18 +1497,18 @@ DESCR("increment");
 DATA(insert OID = 1230 (  int8abs		   PGUID 12 f t t t 1 f 20 "20" 100 0 0 100  int8abs - ));
 DESCR("absolute value");
 
-DATA(insert OID = 1236 (  int8larger	   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8larger - ));
+DATA(insert OID = 1236 (  int8larger	   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1237 (  int8smaller	   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8smaller - ));
+DATA(insert OID = 1237 (  int8smaller	   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8smaller - ));
 DESCR("smaller of two");
 
-DATA(insert OID = 1238 (  texticregexeq    PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	texticregexeq - ));
+DATA(insert OID = 1238 (  texticregexeq    PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  texticregexeq - ));
 DESCR("matches regex., case-insensitive");
-DATA(insert OID = 1239 (  texticregexne    PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100	texticregexne - ));
+DATA(insert OID = 1239 (  texticregexne    PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100  texticregexne - ));
 DESCR("does not match regex., case-insensitive");
-DATA(insert OID = 1240 (  nameicregexeq    PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	nameicregexeq - ));
+DATA(insert OID = 1240 (  nameicregexeq    PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  nameicregexeq - ));
 DESCR("matches regex., case-insensitive");
-DATA(insert OID = 1241 (  nameicregexne    PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100	nameicregexne - ));
+DATA(insert OID = 1241 (  nameicregexne    PGUID 12 f t t t 2 f 16 "19 25" 100 0 0 100  nameicregexne - ));
 DESCR("does not match regex., case-insensitive");
 
 DATA(insert OID = 1251 (  int4abs		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100  int4abs - ));
@@ -1517,29 +1516,29 @@ DESCR("absolute value");
 DATA(insert OID = 1253 (  int2abs		   PGUID 12 f t t t 1 f 21 "21" 100 0 0 100  int2abs - ));
 DESCR("absolute value");
 
-DATA(insert OID = 1263 (  interval		   PGUID 12 f t f t 1 f 1186 "25" 100 0 0 100  text_interval - ));
+DATA(insert OID = 1263 (  interval		   PGUID 12 f t t t 1 f 1186 "25" 100 0 0 100  text_interval - ));
 DESCR("convert text to interval");
 
 DATA(insert OID = 1271 (  overlaps		   PGUID 12 f t t f 4 f 16 "1266 1266 1266 1266" 100 0 0 100  overlaps_timetz - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1272 (  datetime_pl	   PGUID 12 f t f t 2 f 1184 "1082 1083" 100 0 0 100	datetime_timestamp - ));
+DATA(insert OID = 1272 (  datetime_pl	   PGUID 12 f t t t 2 f 1114 "1082 1083" 100 0 0 100  datetime_timestamp - ));
 DESCR("convert date and time to timestamp");
 
-DATA(insert OID = 1274 (  int84pl		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int84pl - ));
+DATA(insert OID = 1274 (  int84pl		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int84pl - ));
 DESCR("add");
-DATA(insert OID = 1275 (  int84mi		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int84mi - ));
+DATA(insert OID = 1275 (  int84mi		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int84mi - ));
 DESCR("subtract");
-DATA(insert OID = 1276 (  int84mul		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int84mul - ));
+DATA(insert OID = 1276 (  int84mul		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int84mul - ));
 DESCR("multiply");
-DATA(insert OID = 1277 (  int84div		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int84div - ));
+DATA(insert OID = 1277 (  int84div		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int84div - ));
 DESCR("divide");
-DATA(insert OID = 1278 (  int48pl		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100	int48pl - ));
+DATA(insert OID = 1278 (  int48pl		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100  int48pl - ));
 DESCR("add");
-DATA(insert OID = 1279 (  int48mi		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100	int48mi - ));
+DATA(insert OID = 1279 (  int48mi		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100  int48mi - ));
 DESCR("subtract");
-DATA(insert OID = 1280 (  int48mul		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100	int48mul - ));
+DATA(insert OID = 1280 (  int48mul		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100  int48mul - ));
 DESCR("multiply");
-DATA(insert OID = 1281 (  int48div		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100	int48div - ));
+DATA(insert OID = 1281 (  int48div		   PGUID 12 f t t t 2 f 20 "23 20" 100 0 0 100  int48div - ));
 DESCR("divide");
 
 DATA(insert OID = 1288 (  text			   PGUID 12 f t t t 1 f 25 "20" 100 0 0 100  int8_text - ));
@@ -1547,61 +1546,65 @@ DESCR("convert int8 to text");
 DATA(insert OID = 1289 (  int8			   PGUID 12 f t t t 1 f 20 "25" 100 0 0 100  text_int8 - ));
 DESCR("convert text to int8");
 
-DATA(insert OID = 1290 (  _bpchar		   PGUID 12 f t t t 2 f 1014 "1014 23" 100 0 0 100	_bpchar - ));
+DATA(insert OID = 1290 (  _bpchar		   PGUID 12 f t t t 2 f 1014 "1014 23" 100 0 0 100  _bpchar - ));
 DESCR("adjust char()[] to typmod length");
-DATA(insert OID = 1291 (  _varchar		   PGUID 12 f t t t 2 f 1015 "1015 23" 100 0 0 100	_varchar - ));
+DATA(insert OID = 1291 (  _varchar		   PGUID 12 f t t t 2 f 1015 "1015 23" 100 0 0 100  _varchar - ));
 DESCR("adjust varchar()[] to typmod length");
 
-DATA(insert OID = 1292 ( tideq			   PGUID 12 f t f t 2 f 16 "27 27" 100 0 0 100	tideq - ));
+DATA(insert OID = 1292 ( tideq			   PGUID 12 f t f t 2 f 16 "27 27" 100 0 0 100  tideq - ));
 DESCR("equal");
-DATA(insert OID = 1293 ( currtid		   PGUID 12 f t f t 2 f 27 "26 27" 100 0 0 100	currtid_byreloid - ));
+DATA(insert OID = 1293 ( currtid		   PGUID 12 f t f t 2 f 27 "26 27" 100 0 0 100  currtid_byreloid - ));
 DESCR("latest tid of a tuple");
-DATA(insert OID = 1294 ( currtid2		   PGUID 12 f t f t 2 f 27 "25 27" 100 0 0 100	currtid_byrelname - ));
+DATA(insert OID = 1294 ( currtid2		   PGUID 12 f t f t 2 f 27 "25 27" 100 0 0 100  currtid_byrelname - ));
 DESCR("latest tid of a tuple");
 
-DATA(insert OID = 1296 (  timedate_pl	   PGUID 14 f t f t 2 f 1184 "1083 1082" 100 0 0 100	"select datetime_pl($2, $1)" - ));
+DATA(insert OID = 1296 (  timedate_pl	   PGUID 14 f t t t 2 f 1114 "1083 1082" 100 0 0 100  "select datetime_pl($2, $1)" - ));
 DESCR("convert time and date to timestamp");
-DATA(insert OID = 1297 (  datetimetz_pl    PGUID 12 f t f t 2 f 1184 "1082 1266" 100 0 0 100	datetimetz_timestamp - ));
-DESCR("convert date and time with time zone to timestamp");
-DATA(insert OID = 1298 (  timetzdate_pl    PGUID 14 f t f t 2 f 1184 "1266 1082" 100 0 0 100	"select datetimetz_pl($2, $1)" - ));
+DATA(insert OID = 1297 (  datetimetz_pl    PGUID 12 f t t t 2 f 1184 "1082 1266" 100 0 0 100  datetimetz_timestamptz - ));
+DESCR("convert date and time with time zone to timestamp with time zone");
+DATA(insert OID = 1298 (  timetzdate_pl    PGUID 14 f t t t 2 f 1184 "1266 1082" 100 0 0 100  "select datetimetz_pl($2, $1)" - ));
 DESCR("convert time with time zone and date to timestamp");
-DATA(insert OID = 1299 (  now			   PGUID 12 f t f t 0 f 1184 "0" 100 0 0 100	now - ));
+DATA(insert OID = 1299 (  now			   PGUID 12 f t f t 0 f 1184 "0" 100 0 0 100  now - ));
 DESCR("current transaction time");
 
 /* OIDS 1300 - 1399 */
 
 DATA(insert OID = 1300 (  positionsel		   PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  positionsel - ));
 DESCR("restriction selectivity for position-comparison operators");
-DATA(insert OID = 1301 (  positionjoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	positionjoinsel - ));
+DATA(insert OID = 1301 (  positionjoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  positionjoinsel - ));
 DESCR("join selectivity for position-comparison operators");
 DATA(insert OID = 1302 (  contsel		   PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  contsel - ));
 DESCR("restriction selectivity for containment comparison operators");
-DATA(insert OID = 1303 (  contjoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	contjoinsel - ));
+DATA(insert OID = 1303 (  contjoinsel	   PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  contjoinsel - ));
 DESCR("join selectivity for containment comparison operators");
 
-DATA(insert OID = 1304 ( overlaps			 PGUID 12 f t t f 4 f 16 "1184 1184 1184 1184" 100 0 0 100	overlaps_timestamp - ));
+DATA(insert OID = 1304 ( overlaps			 PGUID 12 f t t f 4 f 16 "1184 1184 1184 1184" 100 0 0 100  overlaps_timestamp - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1305 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1186 1184 1186" 100 0 0 100	"select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))" - ));
+DATA(insert OID = 1305 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1186 1184 1186" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))" - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1306 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1184 1184 1186" 100 0 0 100	"select ($1, $2) overlaps ($3, ($3 + $4))" - ));
+DATA(insert OID = 1306 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1184 1184 1186" 100 0 0 100  "select ($1, $2) overlaps ($3, ($3 + $4))" - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1307 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1186 1184 1184" 100 0 0 100	"select ($1, ($1 + $2)) overlaps ($3, $4)" - ));
+DATA(insert OID = 1307 ( overlaps			 PGUID 14 f t t f 4 f 16 "1184 1186 1184 1184" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, $4)" - ));
 DESCR("SQL92 interval comparison");
 
-DATA(insert OID = 1308 ( overlaps			 PGUID 12 f t t f 4 f 16 "1083 1083 1083 1083" 100 0 0 100	overlaps_time - ));
+DATA(insert OID = 1308 ( overlaps			 PGUID 12 f t t f 4 f 16 "1083 1083 1083 1083" 100 0 0 100  overlaps_time - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1309 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1186 1083 1186" 100 0 0 100	"select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))" - ));
+DATA(insert OID = 1309 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1186 1083 1186" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))" - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1310 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1083 1083 1186" 100 0 0 100	"select ($1, $2) overlaps ($3, ($3 + $4))" - ));
+DATA(insert OID = 1310 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1083 1083 1186" 100 0 0 100  "select ($1, $2) overlaps ($3, ($3 + $4))" - ));
 DESCR("SQL92 interval comparison");
-DATA(insert OID = 1311 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1186 1083 1083" 100 0 0 100	"select ($1, ($1 + $2)) overlaps ($3, $4)" - ));
+DATA(insert OID = 1311 ( overlaps			 PGUID 14 f t t f 4 f 16 "1083 1186 1083 1083" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, $4)" - ));
 DESCR("SQL92 interval comparison");
 
-DATA(insert OID = 1314 (  timestamp_cmp		 PGUID 12 f t f t 2 f	23 "1184 1184" 100 0 0 100	timestamp_cmp - ));
+DATA(insert OID = 1312 (  timestamp_in		 PGUID 12 f t f t 1 f 1114 "0" 100 0 0 100  timestamp_in - ));
+DESCR("(internal)");
+DATA(insert OID = 1313 (  timestamp_out		 PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  timestamp_out - ));
+DESCR("(internal)");
+DATA(insert OID = 1314 (  timestamptz_cmp	 PGUID 12 f t t t 2 f	23 "1184 1184" 100 0 0 100  timestamp_cmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 1315 (  interval_cmp		 PGUID 12 f t f t 2 f	23 "1186 1186" 100 0 0 100	interval_cmp - ));
+DATA(insert OID = 1315 (  interval_cmp		 PGUID 12 f t t t 2 f	23 "1186 1186" 100 0 0 100  interval_cmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 1316 (  time				 PGUID 12 f t f t 1 f 1083 "1184" 100 0 0 100  timestamp_time - ));
+DATA(insert OID = 1316 (  time				 PGUID 12 f t t t 1 f 1083 "1114" 100 0 0 100  timestamp_time - ));
 DESCR("convert timestamp to time");
 
 DATA(insert OID = 1317 (  length			 PGUID 12 f t t t 1 f	23 "25" 100 0 0 100  textlen - ));
@@ -1611,7 +1614,7 @@ DESCR("character length");
 DATA(insert OID = 1319 (  length			 PGUID 12 f t t t 1 f	23 "1043" 100 0 0 100  varcharlen - ));
 DESCR("character length");
 
-DATA(insert OID = 1326 (  interval_div		 PGUID 12 f t f t 2 f 1186 "1186 701" 100 0 0 100  interval_div - ));
+DATA(insert OID = 1326 (  interval_div		 PGUID 12 f t t t 2 f 1186 "1186 701" 100 0 0 100  interval_div - ));
 DESCR("divide");
 
 DATA(insert OID = 1339 (  dlog10			 PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dlog10 - ));
@@ -1643,40 +1646,40 @@ DATA(insert OID = 1349 (  oidvectortypes	 PGUID 12 f t f t 1 f	25 "30" 100 0 0 1
 DESCR("print type names of oidvector field");
 
 
-DATA(insert OID = 1350 (  timetz_in		   PGUID 12 f t f t 1 f 1266 "0" 100 0 0 100	timetz_in - ));
+DATA(insert OID = 1350 (  timetz_in		   PGUID 12 f t f t 1 f 1266 "0" 100 0 0 100  timetz_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1351 (  timetz_out	   PGUID 12 f t f t 1 f 23 "0" 100 0 0 100	timetz_out - ));
+DATA(insert OID = 1351 (  timetz_out	   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  timetz_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1352 (  timetz_eq		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_eq - ));
+DATA(insert OID = 1352 (  timetz_eq		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_eq - ));
 DESCR("equal");
-DATA(insert OID = 1353 (  timetz_ne		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_ne - ));
+DATA(insert OID = 1353 (  timetz_ne		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_ne - ));
 DESCR("not equal");
-DATA(insert OID = 1354 (  timetz_lt		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_lt - ));
+DATA(insert OID = 1354 (  timetz_lt		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_lt - ));
 DESCR("less-than");
-DATA(insert OID = 1355 (  timetz_le		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_le - ));
+DATA(insert OID = 1355 (  timetz_le		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1356 (  timetz_ge		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_ge - ));
+DATA(insert OID = 1356 (  timetz_ge		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1357 (  timetz_gt		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100	timetz_gt - ));
+DATA(insert OID = 1357 (  timetz_gt		   PGUID 12 f t t t 2 f 16 "1266 1266" 100 0 0 100  timetz_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1358 (  timetz_cmp	   PGUID 12 f t t t 2 f 23 "1266 1266" 100 0 0 100	timetz_cmp - ));
+DATA(insert OID = 1358 (  timetz_cmp	   PGUID 12 f t t t 2 f 23 "1266 1266" 100 0 0 100  timetz_cmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 1359 (  timestamp		   PGUID 12 f t f t 2 f 1184 "1082 1266" 100 0 0 100	datetimetz_timestamp - ));
-DESCR("convert date and time with time zone to timestamp");
+DATA(insert OID = 1359 (  timestamptz	   PGUID 12 f t t t 2 f 1184 "1082 1266" 100 0 0 100  datetimetz_timestamptz - ));
+DESCR("convert date and time with time zone to timestamp with time zone");
 
 DATA(insert OID = 1362 (  time				 PGUID 14 f t t t 1 f 1083 "1083" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
-DATA(insert OID = 1364 (  time				 PGUID 14 f t f t 1 f 1083 "702" 100 0 0 100	"select time(timestamp($1))" - ));
+DATA(insert OID = 1364 (  time				 PGUID 14 f t t t 1 f 1083 "702" 100 0 0 100  "select time(timestamp($1))" - ));
 DESCR("convert abstime to time");
-DATA(insert OID = 1365 (  abstime			 PGUID 14 f t f t 1 f  702 "702" 100 0 0 100	"select $1" - ));
+DATA(insert OID = 1365 (  abstime			 PGUID 14 f t f t 1 f  702 "702" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
-DATA(insert OID = 1367 (  reltime			 PGUID 14 f t t t 1 f  703 "703" 100 0 0 100	"select $1" - ));
+DATA(insert OID = 1367 (  reltime			 PGUID 14 f t t t 1 f  703 "703" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
-DATA(insert OID = 1368 (  timestamp			 PGUID 14 f t f t 1 f 1184 "1184" 100 0 0 100  "select $1" - ));
+DATA(insert OID = 1368 (  timestamptz		 PGUID 14 f t t t 1 f 1184 "1184" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
 DATA(insert OID = 1369 (  interval			 PGUID 14 f t t t 1 f 1186 "1186" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
-DATA(insert OID = 1370 (  interval			 PGUID 12 f t f t 1 f 1186 "1083" 100 0 0 100  time_interval - ));
+DATA(insert OID = 1370 (  interval			 PGUID 12 f t t t 1 f 1186 "1083" 100 0 0 100  time_interval - ));
 DESCR("convert time to interval");
 DATA(insert OID = 1371 (  date				 PGUID 14 f t t t 1 f 1082 "1082" 100 0 0 100  "select $1" - ));
 DESCR("convert (noop)");
@@ -1692,37 +1695,37 @@ DESCR("octet length");
 DATA(insert OID = 1376 (  octet_length			 PGUID 12 f t t t 1 f	23	 "1043" 100 0 0 100  varcharoctetlen - ));
 DESCR("octet length");
 
-DATA(insert OID = 1377 (  time_larger	   PGUID 12 f t t t 2 f 1083 "1083 1083" 100 0 0 100	time_larger - ));
+DATA(insert OID = 1377 (  time_larger	   PGUID 12 f t t t 2 f 1083 "1083 1083" 100 0 0 100  time_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1378 (  time_smaller	   PGUID 12 f t t t 2 f 1083 "1083 1083" 100 0 0 100	time_smaller - ));
+DATA(insert OID = 1378 (  time_smaller	   PGUID 12 f t t t 2 f 1083 "1083 1083" 100 0 0 100  time_smaller - ));
 DESCR("smaller of two");
-DATA(insert OID = 1379 (  timetz_larger    PGUID 12 f t t t 2 f 1266 "1266 1266" 100 0 0 100	timetz_larger - ));
+DATA(insert OID = 1379 (  timetz_larger    PGUID 12 f t t t 2 f 1266 "1266 1266" 100 0 0 100  timetz_larger - ));
 DESCR("larger of two");
-DATA(insert OID = 1380 (  timetz_smaller   PGUID 12 f t t t 2 f 1266 "1266 1266" 100 0 0 100	timetz_smaller - ));
+DATA(insert OID = 1380 (  timetz_smaller   PGUID 12 f t t t 2 f 1266 "1266 1266" 100 0 0 100  timetz_smaller - ));
 DESCR("smaller of two");
 
 DATA(insert OID = 1381 (  char_length	   PGUID 12 f t t t 1 f 23 "25" 100 0 0 100  textlen - ));
 DESCR("length");
 
-DATA(insert OID = 1382 (  date_part    PGUID 14 f t f t 2 f  701 "25 702" 100 0 0 100  "select date_part($1, timestamp($2))" - ));
+DATA(insert OID = 1382 (  date_part    PGUID 14 f t f t 2 f  701 "25 702" 100 0 0 100  "select date_part($1, timestamptz($2))" - ));
 DESCR("extract field from abstime");
 DATA(insert OID = 1383 (  date_part    PGUID 14 f t f t 2 f  701 "25 703" 100 0 0 100  "select date_part($1, interval($2))" - ));
 DESCR("extract field from reltime");
-DATA(insert OID = 1384 (  date_part    PGUID 14 f t f t 2 f  701 "25 1082" 100 0 0 100	"select date_part($1, timestamp($2))" - ));
+DATA(insert OID = 1384 (  date_part    PGUID 14 f t t t 2 f  701 "25 1082" 100 0 0 100  "select date_part($1, timestamptz($2))" - ));
 DESCR("extract field from date");
-DATA(insert OID = 1385 (  date_part    PGUID 14 f t f t 2 f  701 "25 1083" 100 0 0 100	"select date_part($1, interval($2))" - ));
+DATA(insert OID = 1385 (  date_part    PGUID 14 f t t t 2 f  701 "25 1083" 100 0 0 100  "select date_part($1, interval($2))" - ));
 DESCR("extract field from time");
-DATA(insert OID = 1386 (  age		   PGUID 14 f t f t 1 f 1186 "1184" 100 0 0 100  "select age(\'today\', $1)" - ));
+DATA(insert OID = 1386 (  age		   PGUID 14 f t t t 1 f 1186 "1184" 100 0 0 100  "select age(\'today\', $1)" - ));
 DESCR("date difference from today preserving months and years");
 
-DATA(insert OID = 1387 (  timetz		   PGUID 14 f t f t 1 f 1266 "1266" 100 0 0 100  "select $1" - ));
+DATA(insert OID = 1387 (  timetz		   PGUID 14 f t t t 1 f 1266 "1266" 100 0 0 100  "select $1" - ));
 DESCR("noop conversion");
-DATA(insert OID = 1388 (  timetz		   PGUID 12 f t f t 1 f 1266 "1184" 100 0 0 100  timestamp_timetz - ));
+DATA(insert OID = 1388 (  timetz		   PGUID 12 f t t t 1 f 1266 "1184" 100 0 0 100  timestamptz_timetz - ));
 DESCR("convert timestamp to timetz");
 
-DATA(insert OID = 1389 (  isfinite	   PGUID 12 f t f t 1 f 16 "1184" 100 0 0 100  timestamp_finite - ));
+DATA(insert OID = 1389 (  isfinite	   PGUID 12 f t t t 1 f 16 "1184" 100 0 0 100  timestamp_finite - ));
 DESCR("boolean test");
-DATA(insert OID = 1390 (  isfinite	   PGUID 12 f t f t 1 f 16 "1186" 100 0 0 100  interval_finite - ));
+DATA(insert OID = 1390 (  isfinite	   PGUID 12 f t t t 1 f 16 "1186" 100 0 0 100  interval_finite - ));
 DESCR("boolean test");
 
 
@@ -1759,17 +1762,17 @@ DESCR("convert (no-op)");
 DATA(insert OID = 1405 (  int4		   PGUID 14 f t t t 1 f 23	 "23" 100 0 0 100  "select $1" - ));
 DESCR("convert (no-op)");
 
-DATA(insert OID = 1406 (  isvertical		PGUID 12 f t t t 2 f	16 "600 600" 100 0 0 100	point_vert - ));
+DATA(insert OID = 1406 (  isvertical		PGUID 12 f t t t 2 f	16 "600 600" 100 0 0 100  point_vert - ));
 DESCR("vertically aligned?");
-DATA(insert OID = 1407 (  ishorizontal		PGUID 12 f t t t 2 f	16 "600 600" 100 0 0 100	point_horiz - ));
+DATA(insert OID = 1407 (  ishorizontal		PGUID 12 f t t t 2 f	16 "600 600" 100 0 0 100  point_horiz - ));
 DESCR("horizontally aligned?");
-DATA(insert OID = 1408 (  isparallel		PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 100	lseg_parallel - ));
+DATA(insert OID = 1408 (  isparallel		PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 100  lseg_parallel - ));
 DESCR("parallel?");
-DATA(insert OID = 1409 (  isperp			PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 100	lseg_perp - ));
+DATA(insert OID = 1409 (  isperp			PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 100  lseg_perp - ));
 DESCR("perpendicular?");
-DATA(insert OID = 1410 (  isvertical		PGUID 12 f t t t 1 f	16 "601" 100 0 0 100	lseg_vertical - ));
+DATA(insert OID = 1410 (  isvertical		PGUID 12 f t t t 1 f	16 "601" 100 0 0 100  lseg_vertical - ));
 DESCR("vertical?");
-DATA(insert OID = 1411 (  ishorizontal		PGUID 12 f t t t 1 f	16 "601" 100 0 0 100	lseg_horizontal - ));
+DATA(insert OID = 1411 (  ishorizontal		PGUID 12 f t t t 1 f	16 "601" 100 0 0 100  lseg_horizontal - ));
 DESCR("horizontal?");
 DATA(insert OID = 1412 (  isparallel		PGUID 12 f t t t 2 f	16 "628 628" 100 0 0 100  line_parallel - ));
 DESCR("lines parallel?");
@@ -1779,7 +1782,7 @@ DATA(insert OID = 1414 (  isvertical		PGUID 12 f t t t 1 f	16 "628" 100 0 0 100
 DESCR("lines vertical?");
 DATA(insert OID = 1415 (  ishorizontal		PGUID 12 f t t t 1 f	16 "628" 100 0 0 100  line_horizontal - ));
 DESCR("lines horizontal?");
-DATA(insert OID = 1416 (  point				PGUID 12 f t t t 1 f 600 "718" 100 0 0 100	circle_center - ));
+DATA(insert OID = 1416 (  point				PGUID 12 f t t t 1 f 600 "718" 100 0 0 100  circle_center - ));
 DESCR("center of");
 
 DATA(insert OID = 1417 (  isnottrue			PGUID 12 f t t f 1 f 16 "16" 100 0 0 100  isnottrue - ));
@@ -1787,18 +1790,18 @@ DESCR("bool is not true (ie, false or unknown)");
 DATA(insert OID = 1418 (  isnotfalse		PGUID 12 f t t f 1 f 16 "16" 100 0 0 100  isnotfalse - ));
 DESCR("bool is not false (ie, true or unknown)");
 
-DATA(insert OID = 1419 (  time				PGUID 12 f t f t 1 f 1083 "1186" 100 0 0 100  interval_time - ));
+DATA(insert OID = 1419 (  time				PGUID 12 f t t t 1 f 1083 "1186" 100 0 0 100  interval_time - ));
 DESCR("convert interval to time");
 
-DATA(insert OID = 1421 (  box				PGUID 12 f t t t 2 f 603 "600 600" 100 0 0 100	points_box - ));
+DATA(insert OID = 1421 (  box				PGUID 12 f t t t 2 f 603 "600 600" 100 0 0 100  points_box - ));
 DESCR("convert points to box");
-DATA(insert OID = 1422 (  box_add			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100	box_add - ));
+DATA(insert OID = 1422 (  box_add			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100  box_add - ));
 DESCR("add point to box (translate)");
-DATA(insert OID = 1423 (  box_sub			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100	box_sub - ));
+DATA(insert OID = 1423 (  box_sub			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100  box_sub - ));
 DESCR("subtract point from box (translate)");
-DATA(insert OID = 1424 (  box_mul			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100	box_mul - ));
+DATA(insert OID = 1424 (  box_mul			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100  box_mul - ));
 DESCR("multiply box by point (scale)");
-DATA(insert OID = 1425 (  box_div			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100	box_div - ));
+DATA(insert OID = 1425 (  box_div			PGUID 12 f t t t 2 f 603 "603 600" 100 0 0 100  box_div - ));
 DESCR("divide box by point (scale)");
 DATA(insert OID = 1426 (  path_contain_pt	PGUID 14 f t t t 2 f	16 "602 600" 100 0 0 100  "select on_ppath($2, $1)" - ));
 DESCR("path contains point?");
@@ -1818,104 +1821,104 @@ DESCR("# points in path");
  * - thomas 97/04/20
  */
 
-DATA(insert OID = 1433 (  pclose			PGUID 12 f t t t 1 f 602 "602" 100 0 0 100	path_close - ));
+DATA(insert OID = 1433 (  pclose			PGUID 12 f t t t 1 f 602 "602" 100 0 0 100  path_close - ));
 DESCR("close path");
-DATA(insert OID = 1434 (  popen				PGUID 12 f t t t 1 f 602 "602" 100 0 0 100	path_open - ));
+DATA(insert OID = 1434 (  popen				PGUID 12 f t t t 1 f 602 "602" 100 0 0 100  path_open - ));
 DESCR("open path");
-DATA(insert OID = 1435 (  path_add			PGUID 12 f t t t 2 f 602 "602 602" 100 0 0 100	path_add - ));
+DATA(insert OID = 1435 (  path_add			PGUID 12 f t t t 2 f 602 "602 602" 100 0 0 100  path_add - ));
 DESCR("concatenate open paths");
-DATA(insert OID = 1436 (  path_add_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100	path_add_pt - ));
+DATA(insert OID = 1436 (  path_add_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100  path_add_pt - ));
 DESCR("add (translate path)");
-DATA(insert OID = 1437 (  path_sub_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100	path_sub_pt - ));
+DATA(insert OID = 1437 (  path_sub_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100  path_sub_pt - ));
 DESCR("subtract (translate path)");
-DATA(insert OID = 1438 (  path_mul_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100	path_mul_pt - ));
+DATA(insert OID = 1438 (  path_mul_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100  path_mul_pt - ));
 DESCR("multiply (rotate/scale path)");
-DATA(insert OID = 1439 (  path_div_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100	path_div_pt - ));
+DATA(insert OID = 1439 (  path_div_pt		PGUID 12 f t t t 2 f 602 "602 600" 100 0 0 100  path_div_pt - ));
 DESCR("divide (rotate/scale path)");
 
-DATA(insert OID = 1440 (  point				PGUID 12 f t t t 2 f 600 "701 701" 100 0 0 100	construct_point - ));
+DATA(insert OID = 1440 (  point				PGUID 12 f t t t 2 f 600 "701 701" 100 0 0 100  construct_point - ));
 DESCR("convert x, y to point");
-DATA(insert OID = 1441 (  point_add			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100	point_add - ));
+DATA(insert OID = 1441 (  point_add			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100  point_add - ));
 DESCR("add points (translate)");
-DATA(insert OID = 1442 (  point_sub			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100	point_sub - ));
+DATA(insert OID = 1442 (  point_sub			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100  point_sub - ));
 DESCR("subtract points (translate)");
-DATA(insert OID = 1443 (  point_mul			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100	point_mul - ));
+DATA(insert OID = 1443 (  point_mul			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100  point_mul - ));
 DESCR("multiply points (scale/rotate)");
-DATA(insert OID = 1444 (  point_div			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100	point_div - ));
+DATA(insert OID = 1444 (  point_div			PGUID 12 f t t t 2 f 600 "600 600" 100 0 0 100  point_div - ));
 DESCR("divide points (scale/rotate)");
 
 DATA(insert OID = 1445 (  poly_npoints		PGUID 12 f t t t 1 f	23 "604" 100 0 0 100  poly_npoints - ));
 DESCR("number of points in polygon");
-DATA(insert OID = 1446 (  box				PGUID 12 f t t t 1 f 603 "604" 100 0 0 100	poly_box - ));
+DATA(insert OID = 1446 (  box				PGUID 12 f t t t 1 f 603 "604" 100 0 0 100  poly_box - ));
 DESCR("convert polygon to bounding box");
-DATA(insert OID = 1447 (  path				PGUID 12 f t t t 1 f 602 "604" 100 0 0 100	poly_path - ));
+DATA(insert OID = 1447 (  path				PGUID 12 f t t t 1 f 602 "604" 100 0 0 100  poly_path - ));
 DESCR("convert polygon to path");
-DATA(insert OID = 1448 (  polygon			PGUID 12 f t t t 1 f 604 "603" 100 0 0 100	box_poly - ));
+DATA(insert OID = 1448 (  polygon			PGUID 12 f t t t 1 f 604 "603" 100 0 0 100  box_poly - ));
 DESCR("convert box to polygon");
-DATA(insert OID = 1449 (  polygon			PGUID 12 f t t t 1 f 604 "602" 100 0 0 100	path_poly - ));
+DATA(insert OID = 1449 (  polygon			PGUID 12 f t t t 1 f 604 "602" 100 0 0 100  path_poly - ));
 DESCR("convert path to polygon");
 
 DATA(insert OID = 1450 (  circle_in			PGUID 12 f t t t 1 f 718 "0" 100 0 0 100  circle_in - ));
 DESCR("(internal)");
 DATA(insert OID = 1451 (  circle_out		PGUID 12 f t t t 1 f	23	"718" 100 0 0 100  circle_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1452 (  circle_same		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_same - ));
+DATA(insert OID = 1452 (  circle_same		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_same - ));
 DESCR("same as");
-DATA(insert OID = 1453 (  circle_contain	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_contain - ));
+DATA(insert OID = 1453 (  circle_contain	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_contain - ));
 DESCR("contains");
-DATA(insert OID = 1454 (  circle_left		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_left - ));
+DATA(insert OID = 1454 (  circle_left		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_left - ));
 DESCR("is left of");
-DATA(insert OID = 1455 (  circle_overleft	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_overleft - ));
+DATA(insert OID = 1455 (  circle_overleft	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_overleft - ));
 DESCR("overlaps, but does not extend to right of");
-DATA(insert OID = 1456 (  circle_overright	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_overright - ));
+DATA(insert OID = 1456 (  circle_overright	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_overright - ));
 DESCR("");
-DATA(insert OID = 1457 (  circle_right		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_right - ));
+DATA(insert OID = 1457 (  circle_right		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_right - ));
 DESCR("is right of");
-DATA(insert OID = 1458 (  circle_contained	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_contained - ));
+DATA(insert OID = 1458 (  circle_contained	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_contained - ));
 DESCR("");
-DATA(insert OID = 1459 (  circle_overlap	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_overlap - ));
+DATA(insert OID = 1459 (  circle_overlap	PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_overlap - ));
 DESCR("overlaps");
-DATA(insert OID = 1460 (  circle_below		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_below - ));
+DATA(insert OID = 1460 (  circle_below		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_below - ));
 DESCR("is below");
-DATA(insert OID = 1461 (  circle_above		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_above - ));
+DATA(insert OID = 1461 (  circle_above		PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_above - ));
 DESCR("is above");
-DATA(insert OID = 1462 (  circle_eq			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_eq - ));
+DATA(insert OID = 1462 (  circle_eq			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_eq - ));
 DESCR("equal by area");
-DATA(insert OID = 1463 (  circle_ne			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_ne - ));
+DATA(insert OID = 1463 (  circle_ne			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_ne - ));
 DESCR("not equal by area");
-DATA(insert OID = 1464 (  circle_lt			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_lt - ));
+DATA(insert OID = 1464 (  circle_lt			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_lt - ));
 DESCR("less-than by area");
-DATA(insert OID = 1465 (  circle_gt			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_gt - ));
+DATA(insert OID = 1465 (  circle_gt			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_gt - ));
 DESCR("greater-than by area");
-DATA(insert OID = 1466 (  circle_le			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_le - ));
+DATA(insert OID = 1466 (  circle_le			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_le - ));
 DESCR("less-than-or-equal by area");
-DATA(insert OID = 1467 (  circle_ge			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100	circle_ge - ));
+DATA(insert OID = 1467 (  circle_ge			PGUID 12 f t t t 2 f	16 "718 718" 100 0 0 100  circle_ge - ));
 DESCR("greater-than-or-equal by area");
-DATA(insert OID = 1468 (  area				PGUID 12 f t t t 1 f 701 "718" 100 0 0 100	circle_area - ));
+DATA(insert OID = 1468 (  area				PGUID 12 f t t t 1 f 701 "718" 100 0 0 100  circle_area - ));
 DESCR("area of circle");
-DATA(insert OID = 1469 (  diameter			PGUID 12 f t t t 1 f 701 "718" 100 0 0 100	circle_diameter - ));
+DATA(insert OID = 1469 (  diameter			PGUID 12 f t t t 1 f 701 "718" 100 0 0 100  circle_diameter - ));
 DESCR("diameter of circle");
-DATA(insert OID = 1470 (  radius			PGUID 12 f t t t 1 f 701 "718" 100 0 0 100	circle_radius - ));
+DATA(insert OID = 1470 (  radius			PGUID 12 f t t t 1 f 701 "718" 100 0 0 100  circle_radius - ));
 DESCR("radius of circle");
-DATA(insert OID = 1471 (  circle_distance	PGUID 12 f t t t 2 f 701 "718 718" 100 0 0 100	circle_distance - ));
+DATA(insert OID = 1471 (  circle_distance	PGUID 12 f t t t 2 f 701 "718 718" 100 0 0 100  circle_distance - ));
 DESCR("distance between");
-DATA(insert OID = 1472 (  circle_center		PGUID 12 f t t t 1 f 600 "718" 100 0 0 100	circle_center - ));
+DATA(insert OID = 1472 (  circle_center		PGUID 12 f t t t 1 f 600 "718" 100 0 0 100  circle_center - ));
 DESCR("center of");
-DATA(insert OID = 1473 (  circle			PGUID 12 f t t t 2 f 718 "600 701" 100 0 0 100	cr_circle - ));
+DATA(insert OID = 1473 (  circle			PGUID 12 f t t t 2 f 718 "600 701" 100 0 0 100  cr_circle - ));
 DESCR("convert point and radius to circle");
-DATA(insert OID = 1474 (  circle			PGUID 12 f t t t 1 f 718 "604" 100 0 0 100	poly_circle - ));
+DATA(insert OID = 1474 (  circle			PGUID 12 f t t t 1 f 718 "604" 100 0 0 100  poly_circle - ));
 DESCR("convert polygon to circle");
 DATA(insert OID = 1475 (  polygon			PGUID 12 f t t t 2 f 604 "23 718" 100 0 0 100  circle_poly - ));
 DESCR("convert vertex count and circle to polygon");
-DATA(insert OID = 1476 (  dist_pc			PGUID 12 f t t t 2 f 701 "600 718" 100 0 0 100	dist_pc - ));
+DATA(insert OID = 1476 (  dist_pc			PGUID 12 f t t t 2 f 701 "600 718" 100 0 0 100  dist_pc - ));
 DESCR("distance between point and circle");
 DATA(insert OID = 1477 (  circle_contain_pt PGUID 12 f t t t 2 f	16 "718 600" 100 0 0 100  circle_contain_pt - ));
 DESCR("circle contains point?");
 DATA(insert OID = 1478 (  pt_contained_circle	PGUID 12 f t t t 2 f	16 "600 718" 100 0 0 100  pt_contained_circle - ));
 DESCR("point inside circle?");
-DATA(insert OID = 1479 (  circle			PGUID 12 f t t t 1 f 718 "603" 100 0 0 100	box_circle - ));
+DATA(insert OID = 1479 (  circle			PGUID 12 f t t t 1 f 718 "603" 100 0 0 100  box_circle - ));
 DESCR("convert box to circle");
-DATA(insert OID = 1480 (  box				PGUID 12 f t t t 1 f 603 "718" 100 0 0 100	circle_box - ));
+DATA(insert OID = 1480 (  box				PGUID 12 f t t t 1 f 603 "718" 100 0 0 100  circle_box - ));
 DESCR("convert circle to box");
 DATA(insert OID = 1481 (  tinterval			 PGUID 12 f t f t 2 f 704 "702 702" 100 0 0 100 mktinterval - ));
 DESCR("convert to tinterval");
@@ -1930,22 +1933,22 @@ DATA(insert OID = 1485 (  lseg_gt			PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 10
 DESCR("greater-than by length");
 DATA(insert OID = 1486 (  lseg_ge			PGUID 12 f t t t 2 f	16 "601 601" 100 0 0 100  lseg_ge - ));
 DESCR("greater-than-or-equal by length");
-DATA(insert OID = 1487 (  lseg_length		PGUID 12 f t t t 1 f 701 "601" 100 0 0 100	lseg_length - ));
+DATA(insert OID = 1487 (  lseg_length		PGUID 12 f t t t 1 f 701 "601" 100 0 0 100  lseg_length - ));
 DESCR("distance between endpoints");
-DATA(insert OID = 1488 (  close_ls			PGUID 12 f t t t 2 f 600 "628 601" 100 0 0 100	close_ls - ));
+DATA(insert OID = 1488 (  close_ls			PGUID 12 f t t t 2 f 600 "628 601" 100 0 0 100  close_ls - ));
 DESCR("closest point to line on line segment");
-DATA(insert OID = 1489 (  close_lseg		PGUID 12 f t t t 2 f 600 "601 601" 100 0 0 100	close_lseg - ));
+DATA(insert OID = 1489 (  close_lseg		PGUID 12 f t t t 2 f 600 "601 601" 100 0 0 100  close_lseg - ));
 DESCR("closest point to line segment on line segment");
 
-DATA(insert OID = 1490 (  line_in			PGUID 12 f t t t 1 f 628 "0" 100 0 0 100	line_in - ));
+DATA(insert OID = 1490 (  line_in			PGUID 12 f t t t 1 f 628 "0" 100 0 0 100  line_in - ));
 DESCR("(internal)");
-DATA(insert OID = 1491 (  line_out			PGUID 12 f t t t 1 f 23  "628" 100 0 0 100	line_out - ));
+DATA(insert OID = 1491 (  line_out			PGUID 12 f t t t 1 f 23  "628" 100 0 0 100  line_out - ));
 DESCR("(internal)");
-DATA(insert OID = 1492 (  line_eq			PGUID 12 f t t t 2 f  16 "628 628" 100 0 0 100	line_eq - ));
+DATA(insert OID = 1492 (  line_eq			PGUID 12 f t t t 2 f  16 "628 628" 100 0 0 100  line_eq - ));
 DESCR("lines equal?");
-DATA(insert OID = 1493 (  line				PGUID 12 f t t t 2 f 628 "600 600" 100 0 0 100	line_construct_pp - ));
+DATA(insert OID = 1493 (  line				PGUID 12 f t t t 2 f 628 "600 600" 100 0 0 100  line_construct_pp - ));
 DESCR("line from points");
-DATA(insert OID = 1494 (  line_interpt		PGUID 12 f t t t 2 f 600 "628 628" 100 0 0 100	line_interpt - ));
+DATA(insert OID = 1494 (  line_interpt		PGUID 12 f t t t 2 f 600 "628 628" 100 0 0 100  line_interpt - ));
 DESCR("intersection point");
 DATA(insert OID = 1495 (  line_intersect	PGUID 12 f t t t 2 f	16 "628 628" 100 0 0 100  line_intersect - ));
 DESCR("lines intersect?");
@@ -1960,27 +1963,27 @@ DESCR("lines horizontal?");
 
 /* OIDS 1500 - 1599 */
 
-DATA(insert OID = 1530 (  length			PGUID 12 f t t t 1 f 701 "601" 100 0 0 100	lseg_length - ));
+DATA(insert OID = 1530 (  length			PGUID 12 f t t t 1 f 701 "601" 100 0 0 100  lseg_length - ));
 DESCR("distance between endpoints");
-DATA(insert OID = 1531 (  length			PGUID 12 f t t t 1 f 701 "602" 100 0 0 100	path_length - ));
+DATA(insert OID = 1531 (  length			PGUID 12 f t t t 1 f 701 "602" 100 0 0 100  path_length - ));
 DESCR("sum of path segments");
 
 
-DATA(insert OID = 1532 (  point				PGUID 12 f t t t 1 f 600 "601" 100 0 0 100	lseg_center - ));
+DATA(insert OID = 1532 (  point				PGUID 12 f t t t 1 f 600 "601" 100 0 0 100  lseg_center - ));
 DESCR("center of");
-DATA(insert OID = 1533 (  point				PGUID 12 f t t t 1 f 600 "602" 100 0 0 100	path_center - ));
+DATA(insert OID = 1533 (  point				PGUID 12 f t t t 1 f 600 "602" 100 0 0 100  path_center - ));
 DESCR("center of");
-DATA(insert OID = 1534 (  point				PGUID 12 f t t t 1 f 600 "603" 100 0 0 100	box_center - ));
+DATA(insert OID = 1534 (  point				PGUID 12 f t t t 1 f 600 "603" 100 0 0 100  box_center - ));
 DESCR("center of");
-DATA(insert OID = 1540 (  point				PGUID 12 f t t t 1 f 600 "604" 100 0 0 100	poly_center - ));
+DATA(insert OID = 1540 (  point				PGUID 12 f t t t 1 f 600 "604" 100 0 0 100  poly_center - ));
 DESCR("center of");
-DATA(insert OID = 1541 (  lseg				PGUID 12 f t t t 1 f 601 "603" 100 0 0 100	box_diagonal - ));
+DATA(insert OID = 1541 (  lseg				PGUID 12 f t t t 1 f 601 "603" 100 0 0 100  box_diagonal - ));
 DESCR("diagonal of");
-DATA(insert OID = 1542 (  center			PGUID 12 f t t t 1 f 600 "603" 100 0 0 100	box_center - ));
+DATA(insert OID = 1542 (  center			PGUID 12 f t t t 1 f 600 "603" 100 0 0 100  box_center - ));
 DESCR("center of");
-DATA(insert OID = 1543 (  center			PGUID 12 f t t t 1 f 600 "718" 100 0 0 100	circle_center - ));
+DATA(insert OID = 1543 (  center			PGUID 12 f t t t 1 f 600 "718" 100 0 0 100  circle_center - ));
 DESCR("center of");
-DATA(insert OID = 1544 (  polygon			PGUID 14 f t t t 1 f 604 "718" 100 0 0 100	"select polygon(12, $1)" - ));
+DATA(insert OID = 1544 (  polygon			PGUID 14 f t t t 1 f 604 "718" 100 0 0 100  "select polygon(12, $1)" - ));
 DESCR("convert circle to 12-vertex polygon");
 DATA(insert OID = 1545 (  npoints			PGUID 12 f t t t 1 f	23 "602" 100 0 0 100  path_npoints - ));
 DESCR("# points in path");
@@ -2005,13 +2008,13 @@ DESCR("convert int8 to int8 (no-op)");
 
 
 /* SEQUENCEs nextval & currval functions */
-DATA(insert OID = 1574 (  nextval			PGUID 12 f t f t 1 f 20 "25" 100 0 0 100	nextval - ));
+DATA(insert OID = 1574 (  nextval			PGUID 12 f t f t 1 f 20 "25" 100 0 0 100  nextval - ));
 DESCR("sequence next value");
-DATA(insert OID = 1575 (  currval			PGUID 12 f t f t 1 f 20 "25" 100 0 0 100	currval - ));
+DATA(insert OID = 1575 (  currval			PGUID 12 f t f t 1 f 20 "25" 100 0 0 100  currval - ));
 DESCR("sequence current value");
 DATA(insert OID = 1576 (  setval			PGUID 12 f t f t 2 f 20 "25 20" 100 0 0 100  setval - ));
 DESCR("set sequence value");
-DATA(insert OID = 1765 (  setval			PGUID 12 f t f t 3 f 20 "25 20 16" 100 0 0 100	setval_and_iscalled - ));
+DATA(insert OID = 1765 (  setval			PGUID 12 f t f t 3 f 20 "25 20 16" 100 0 0 100  setval_and_iscalled - ));
 DESCR("set sequence value and iscalled status");
 
 DATA(insert OID = 1579 (  varbit_in			PGUID 12 f t t t 1 f 1562 "0" 100 0 0 100  varbit_in - ));
@@ -2034,51 +2037,51 @@ DESCR("less than");
 DATA(insert OID = 1596 (  bitcmp			PGUID 12 f t t t 2 f 23 "1560 1560" 100 0 0 100  bitcmp - ));
 DESCR("compare");
 
-DATA(insert OID = 1598 (  random			PGUID 12 f t f t 0 f 701 "0" 100 0 0 100	drandom - ));
+DATA(insert OID = 1598 (  random			PGUID 12 f t f t 0 f 701 "0" 100 0 0 100  drandom - ));
 DESCR("random value");
-DATA(insert OID = 1599 (  setseed			PGUID 12 f t f t 1 f  23 "701" 100 0 0 100	setseed - ));
+DATA(insert OID = 1599 (  setseed			PGUID 12 f t f t 1 f  23 "701" 100 0 0 100  setseed - ));
 DESCR("set random seed");
 
 /* OIDS 1600 - 1699 */
 
-DATA(insert OID = 1600 (  asin				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dasin - ));
+DATA(insert OID = 1600 (  asin				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dasin - ));
 DESCR("arcsine");
-DATA(insert OID = 1601 (  acos				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dacos - ));
+DATA(insert OID = 1601 (  acos				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dacos - ));
 DESCR("arccosine");
-DATA(insert OID = 1602 (  atan				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	datan - ));
+DATA(insert OID = 1602 (  atan				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  datan - ));
 DESCR("arctangent");
-DATA(insert OID = 1603 (  atan2				PGUID 12 f t t t 2 f 701 "701 701" 100 0 0 100	datan2 - ));
+DATA(insert OID = 1603 (  atan2				PGUID 12 f t t t 2 f 701 "701 701" 100 0 0 100  datan2 - ));
 DESCR("arctangent, two arguments");
-DATA(insert OID = 1604 (  sin				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dsin - ));
+DATA(insert OID = 1604 (  sin				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dsin - ));
 DESCR("sine");
-DATA(insert OID = 1605 (  cos				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dcos - ));
+DATA(insert OID = 1605 (  cos				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dcos - ));
 DESCR("cosine");
-DATA(insert OID = 1606 (  tan				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dtan - ));
+DATA(insert OID = 1606 (  tan				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dtan - ));
 DESCR("tangent");
-DATA(insert OID = 1607 (  cot				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	dcot - ));
+DATA(insert OID = 1607 (  cot				PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  dcot - ));
 DESCR("cotangent");
-DATA(insert OID = 1608 (  degrees			PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	degrees - ));
+DATA(insert OID = 1608 (  degrees			PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  degrees - ));
 DESCR("radians to degrees");
-DATA(insert OID = 1609 (  radians			PGUID 12 f t t t 1 f 701 "701" 100 0 0 100	radians - ));
+DATA(insert OID = 1609 (  radians			PGUID 12 f t t t 1 f 701 "701" 100 0 0 100  radians - ));
 DESCR("degrees to radians");
-DATA(insert OID = 1610 (  pi				PGUID 12 f t t t 0 f 701 "0" 100 0 0 100	dpi - ));
+DATA(insert OID = 1610 (  pi				PGUID 12 f t t t 0 f 701 "0" 100 0 0 100  dpi - ));
 DESCR("PI");
 
-DATA(insert OID = 1618 (  interval_mul		PGUID 12 f t t t 2 f 1186 "1186 701" 100 0 0 100	interval_mul - ));
+DATA(insert OID = 1618 (  interval_mul		PGUID 12 f t t t 2 f 1186 "1186 701" 100 0 0 100  interval_mul - ));
 DESCR("multiply interval");
-DATA(insert OID = 1619 (  varchar			PGUID 12 f t t t 1 f 1043 "23" 100 0 0 100	int4_text - ));
+DATA(insert OID = 1619 (  varchar			PGUID 12 f t t t 1 f 1043 "23" 100 0 0 100  int4_text - ));
 DESCR("convert int4 to varchar");
 
-DATA(insert OID = 1620 (  ascii				PGUID 12 f t t t 1 f 23 "25" 100 0 0 100	ascii - ));
+DATA(insert OID = 1620 (  ascii				PGUID 12 f t t t 1 f 23 "25" 100 0 0 100  ascii - ));
 DESCR("convert first char to int4");
-DATA(insert OID = 1621 (  chr				PGUID 12 f t t t 1 f 25 "23" 100 0 0 100	chr - ));
+DATA(insert OID = 1621 (  chr				PGUID 12 f t t t 1 f 25 "23" 100 0 0 100  chr - ));
 DESCR("convert int4 to char");
 DATA(insert OID = 1622 (  repeat			PGUID 12 f t t t 2 f 25 "25 23" 100 0 0 100  repeat - ));
 DESCR("replicate string int4 times");
 
-DATA(insert OID = 1623 (  varchar			PGUID 12 f t t t 1 f 1043 "20" 100 0 0 100	int8_text - ));
+DATA(insert OID = 1623 (  varchar			PGUID 12 f t t t 1 f 1043 "20" 100 0 0 100  int8_text - ));
 DESCR("convert int8 to varchar");
-DATA(insert OID = 1624 (  mul_d_interval	PGUID 12 f t t t 2 f 1186 "701 1186" 100 0 0 100	mul_d_interval - ));
+DATA(insert OID = 1624 (  mul_d_interval	PGUID 12 f t t t 2 f 1186 "701 1186" 100 0 0 100  mul_d_interval - ));
 
 DATA(insert OID = 1633 (  texticlike		PGUID 12 f t t t 2 f 16 "25 25" 100 0 0 100 texticlike - ));
 DESCR("matches LIKE expression, case-insensitive");
@@ -2095,7 +2098,7 @@ DATA(insert OID = 1689 (  update_pg_pwd		  PGUID 12 f t f t 0 f 0  ""  100 0 0 1
 DESCR("update pg_pwd file");
 
 /* Oracle Compatibility Related Functions - By Edmund Mergl <E.Mergl@bawue.de> */
-DATA(insert OID =  868 (  strpos	   PGUID 12 f t t t 2 f 23 "25 25" 100 0 0 100	textpos - ));
+DATA(insert OID =  868 (  strpos	   PGUID 12 f t t t 2 f 23 "25 25" 100 0 0 100  textpos - ));
 DESCR("find position of substring");
 DATA(insert OID =  870 (  lower		   PGUID 12 f t t t 1 f 25 "25" 100 0 0 100  lower - ));
 DESCR("lowercase");
@@ -2107,38 +2110,38 @@ DATA(insert OID =  873 (  lpad		   PGUID 12 f t t t 3 f 25 "25 23 25" 100 0 0 10
 DESCR("left-pad string to length");
 DATA(insert OID =  874 (  rpad		   PGUID 12 f t t t 3 f 25 "25 23 25" 100 0 0 100  rpad - ));
 DESCR("right-pad string to length");
-DATA(insert OID =  875 (  ltrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	ltrim - ));
+DATA(insert OID =  875 (  ltrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  ltrim - ));
 DESCR("left-pad string to length");
-DATA(insert OID =  876 (  rtrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	rtrim - ));
+DATA(insert OID =  876 (  rtrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  rtrim - ));
 DESCR("right-pad string to length");
 DATA(insert OID =  877 (  substr	   PGUID 12 f t t t 3 f 25 "25 23 23" 100 0 0 100  text_substr - ));
 DESCR("return portion of string");
 DATA(insert OID =  878 (  translate    PGUID 12 f t t t 3 f 25 "25 25 25" 100 0 0 100  translate - ));
 DESCR("map a set of character appearing in string");
-DATA(insert OID =  879 (  lpad		   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100	"select lpad($1, $2, \' \')" - ));
+DATA(insert OID =  879 (  lpad		   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100  "select lpad($1, $2, \' \')" - ));
 DESCR("left-pad string to length");
-DATA(insert OID =  880 (  rpad		   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100	"select rpad($1, $2, \' \')" - ));
+DATA(insert OID =  880 (  rpad		   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100  "select rpad($1, $2, \' \')" - ));
 DESCR("right-pad string to length");
 DATA(insert OID =  881 (  ltrim		   PGUID 14 f t t t 1 f 25 "25" 100 0 0 100  "select ltrim($1, \' \')" - ));
 DESCR("remove initial characters from string");
 DATA(insert OID =  882 (  rtrim		   PGUID 14 f t t t 1 f 25 "25" 100 0 0 100  "select rtrim($1, \' \')" - ));
 DESCR("remove trailing characters from string");
-DATA(insert OID =  883 (  substr	   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100	"select substr($1, $2, -1)" - ));
+DATA(insert OID =  883 (  substr	   PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100  "select substr($1, $2, -1)" - ));
 DESCR("return portion of string");
-DATA(insert OID =  884 (  btrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100	btrim - ));
+DATA(insert OID =  884 (  btrim		   PGUID 12 f t t t 2 f 25 "25 25" 100 0 0 100  btrim - ));
 DESCR("trim both ends of string");
 DATA(insert OID =  885 (  btrim		   PGUID 14 f t t t 1 f 25 "25" 100 0 0 100  "select btrim($1, \' \')" - ));
 DESCR("trim both ends of string");
 
 DATA(insert OID =  936 (  substring    PGUID 12 f t t t 3 f 25 "25 23 23" 100 0 0 100  text_substr - ));
 DESCR("return portion of string");
-DATA(insert OID =  937 (  substring    PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100	"select substring($1, $2, -1)" - ));
+DATA(insert OID =  937 (  substring    PGUID 14 f t t t 2 f 25 "25 23" 100 0 0 100  "select substring($1, $2, -1)" - ));
 DESCR("return portion of string");
 
 /* for multi-byte support */
 
 /* old encoding names - back compatibility only */
-DATA(insert OID = 1039 (  getdatabaseencoding	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100	getdatabaseencoding - ));
+DATA(insert OID = 1039 (  getdatabaseencoding	   PGUID 12 f t f t 0 f 19 "0" 100 0 0 100  getdatabaseencoding - ));
 DESCR("encoding name of current database");
 
 DATA(insert OID = 1717 (  convert		   PGUID 12 f t f t 2 f 25 "25 19" 100 0 0 100  pg_convert - ));
@@ -2153,9 +2156,9 @@ DESCR("convert encoding name to encoding id");
 DATA(insert OID = 1597 (  pg_encoding_to_char	   PGUID 12 f t f t 1 f 19 "23" 100 0 0 100  PG_encoding_to_char - ));
 DESCR("convert encoding id to encoding name");
 
-DATA(insert OID = 1638 (  oidgt				   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oidgt - ));
+DATA(insert OID = 1638 (  oidgt				   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oidgt - ));
 DESCR("greater-than");
-DATA(insert OID = 1639 (  oidge				   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100	oidge - ));
+DATA(insert OID = 1639 (  oidge				   PGUID 12 f t t t 2 f 16 "26 26" 100 0 0 100  oidge - ));
 DESCR("greater-than-or-equal");
 
 /* System-view support functions */
@@ -2188,13 +2191,13 @@ DATA(insert OID = 1650 (  RI_FKey_setnull_del	PGUID 12 f t f t 0 f 0 "" 100 0 0
 DESCR("referential integrity ON DELETE SET NULL");
 DATA(insert OID = 1651 (  RI_FKey_setnull_upd	PGUID 12 f t f t 0 f 0 "" 100 0 0 100  RI_FKey_setnull_upd - ));
 DESCR("referential integrity ON UPDATE SET NULL");
-DATA(insert OID = 1652 (  RI_FKey_setdefault_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100	RI_FKey_setdefault_del - ));
+DATA(insert OID = 1652 (  RI_FKey_setdefault_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100  RI_FKey_setdefault_del - ));
 DESCR("referential integrity ON DELETE SET DEFAULT");
-DATA(insert OID = 1653 (  RI_FKey_setdefault_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100	RI_FKey_setdefault_upd - ));
+DATA(insert OID = 1653 (  RI_FKey_setdefault_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100  RI_FKey_setdefault_upd - ));
 DESCR("referential integrity ON UPDATE SET DEFAULT");
-DATA(insert OID = 1654 (  RI_FKey_noaction_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100	RI_FKey_noaction_del - ));
+DATA(insert OID = 1654 (  RI_FKey_noaction_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100  RI_FKey_noaction_del - ));
 DESCR("referential integrity ON DELETE NO ACTION");
-DATA(insert OID = 1655 (  RI_FKey_noaction_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100	RI_FKey_noaction_upd - ));
+DATA(insert OID = 1655 (  RI_FKey_noaction_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100  RI_FKey_noaction_upd - ));
 DESCR("referential integrity ON UPDATE NO ACTION");
 
 DATA(insert OID = 1666 (  varbiteq			PGUID 12 f t t t 2 f 16 "1562 1562" 100 0 0 100  biteq - ));
@@ -2226,24 +2229,24 @@ DATA(insert OID = 1678 (  bitshiftright		PGUID 12 f t t t 2 f 1560 "1560 23" 100
 DESCR("bitwise right shift");
 DATA(insert OID = 1679 (  bitcat			PGUID 12 f t t t 2 f 1560 "1560 1560" 100 0 0 100  bitcat - ));
 DESCR("bitwise concatenation");
-DATA(insert OID = 1680 (  substring			PGUID 12 f t t t 3 f 1560 "1560 23 23" 100 0 0 100	bitsubstr - ));
+DATA(insert OID = 1680 (  substring			PGUID 12 f t t t 3 f 1560 "1560 23 23" 100 0 0 100  bitsubstr - ));
 DESCR("return portion of bitstring");
-DATA(insert OID = 1681 (  length			PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100	bitlength - ));
+DATA(insert OID = 1681 (  length			PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100  bitlength - ));
 DESCR("bitstring length");
-DATA(insert OID = 1682 (  octet_length		PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100	bitoctetlength - ));
+DATA(insert OID = 1682 (  octet_length		PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100  bitoctetlength - ));
 DESCR("octet length");
-DATA(insert OID = 1683 (  bitfromint4		PGUID 12 f t t t 1 f 1560 "23" 100 0 0 100	bitfromint4 - ));
+DATA(insert OID = 1683 (  bitfromint4		PGUID 12 f t t t 1 f 1560 "23" 100 0 0 100  bitfromint4 - ));
 DESCR("int4 to bitstring");
-DATA(insert OID = 1684 (  bittoint4			PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100	bittoint4 - ));
+DATA(insert OID = 1684 (  bittoint4			PGUID 12 f t t t 1 f 23 "1560" 100 0 0 100  bittoint4 - ));
 DESCR("bitstring to int4");
 
-DATA(insert OID = 1685 (  bit			   PGUID 12 f t t t 2 f 1560 "1560 23" 100 0 0 100	bit - ));
+DATA(insert OID = 1685 (  bit			   PGUID 12 f t t t 2 f 1560 "1560 23" 100 0 0 100  bit - ));
 DESCR("adjust bit() to typmod length");
-DATA(insert OID = 1686 (  _bit			   PGUID 12 f t t t 2 f 1561 "1561 23" 100 0 0 100	_bit - ));
+DATA(insert OID = 1686 (  _bit			   PGUID 12 f t t t 2 f 1561 "1561 23" 100 0 0 100  _bit - ));
 DESCR("adjust bit()[] to typmod length");
-DATA(insert OID = 1687 (  varbit		   PGUID 12 f t t t 2 f 1562 "1562 23" 100 0 0 100	varbit - ));
+DATA(insert OID = 1687 (  varbit		   PGUID 12 f t t t 2 f 1562 "1562 23" 100 0 0 100  varbit - ));
 DESCR("adjust varbit() to typmod length");
-DATA(insert OID = 1688 (  _varbit		   PGUID 12 f t t t 2 f 1563 "1563 23" 100 0 0 100	_varbit - ));
+DATA(insert OID = 1688 (  _varbit		   PGUID 12 f t t t 2 f 1563 "1563 23" 100 0 0 100  _varbit - ));
 DESCR("adjust varbit()[] to typmod length");
 
 DATA(insert OID = 1698 (  position		   PGUID 12 f t t t 2 f 23 "1560 1560" 100 0 0 100 bitposition - ));
@@ -2253,91 +2256,94 @@ DESCR("return portion of bitstring");
 
 
 /* for mac type support */
-DATA(insert OID = 436 (  macaddr_in			PGUID 12 f t t t 1 f 829 "0" 100 0 0 100	macaddr_in - ));
+DATA(insert OID = 436 (  macaddr_in			PGUID 12 f t t t 1 f 829 "0" 100 0 0 100  macaddr_in - ));
 DESCR("(internal)");
 DATA(insert OID = 437 (  macaddr_out		PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  macaddr_out - ));
 DESCR("(internal)");
 
-DATA(insert OID = 752 (  text				PGUID 12 f t t t 1 f 25 "829" 100 0 0 100	macaddr_text - ));
+DATA(insert OID = 752 (  text				PGUID 12 f t t t 1 f 25 "829" 100 0 0 100  macaddr_text - ));
 DESCR("MAC address to text");
-DATA(insert OID = 753 (  trunc				PGUID 12 f t t t 1 f 829 "829" 100 0 0 100	macaddr_trunc - ));
+DATA(insert OID = 753 (  trunc				PGUID 12 f t t t 1 f 829 "829" 100 0 0 100  macaddr_trunc - ));
 DESCR("MAC manufacturer fields");
-DATA(insert OID = 767 (  macaddr			PGUID 12 f t t t 1 f 829 "25" 100 0 0 100	text_macaddr - ));
+DATA(insert OID = 767 (  macaddr			PGUID 12 f t t t 1 f 829 "25" 100 0 0 100  text_macaddr - ));
 DESCR("text to MAC address");
 
-DATA(insert OID = 830 (  macaddr_eq			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_eq - ));
+DATA(insert OID = 830 (  macaddr_eq			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_eq - ));
 DESCR("equal");
-DATA(insert OID = 831 (  macaddr_lt			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_lt - ));
+DATA(insert OID = 831 (  macaddr_lt			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_lt - ));
 DESCR("less-than");
-DATA(insert OID = 832 (  macaddr_le			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_le - ));
+DATA(insert OID = 832 (  macaddr_le			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 833 (  macaddr_gt			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_gt - ));
+DATA(insert OID = 833 (  macaddr_gt			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 834 (  macaddr_ge			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_ge - ));
+DATA(insert OID = 834 (  macaddr_ge			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 835 (  macaddr_ne			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100	macaddr_ne - ));
+DATA(insert OID = 835 (  macaddr_ne			PGUID 12 f t t t 2 f 16 "829 829" 100 0 0 100  macaddr_ne - ));
 DESCR("not equal");
-DATA(insert OID = 836 (  macaddr_cmp		PGUID 12 f t t t 2 f 23 "829 829" 100 0 0 100	macaddr_cmp - ));
+DATA(insert OID = 836 (  macaddr_cmp		PGUID 12 f t t t 2 f 23 "829 829" 100 0 0 100  macaddr_cmp - ));
 DESCR("less-equal-greater");
 
 /* for inet type support */
-DATA(insert OID = 910 (  inet_in			PGUID 12 f t t t 1 f 869 "0" 100 0 0 100	inet_in - ));
+DATA(insert OID = 910 (  inet_in			PGUID 12 f t t t 1 f 869 "0" 100 0 0 100  inet_in - ));
 DESCR("(internal)");
 DATA(insert OID = 911 (  inet_out			PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  inet_out - ));
 DESCR("(internal)");
 
 /* for cidr type support */
-DATA(insert OID = 1267 (  cidr_in			PGUID 12 f t t t 1 f 650 "0" 100 0 0 100	cidr_in - ));
+DATA(insert OID = 1267 (  cidr_in			PGUID 12 f t t t 1 f 650 "0" 100 0 0 100  cidr_in - ));
 DESCR("(internal)");
 DATA(insert OID = 1427 (  cidr_out			PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  cidr_out - ));
 DESCR("(internal)");
 
 /* these are used for both inet and cidr */
-DATA(insert OID = 920 (  network_eq			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_eq - ));
+DATA(insert OID = 920 (  network_eq			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_eq - ));
 DESCR("equal");
-DATA(insert OID = 921 (  network_lt			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_lt - ));
+DATA(insert OID = 921 (  network_lt			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_lt - ));
 DESCR("less-than");
-DATA(insert OID = 922 (  network_le			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_le - ));
+DATA(insert OID = 922 (  network_le			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 923 (  network_gt			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_gt - ));
+DATA(insert OID = 923 (  network_gt			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_gt - ));
 DESCR("greater-than");
-DATA(insert OID = 924 (  network_ge			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_ge - ));
+DATA(insert OID = 924 (  network_ge			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_ge - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 925 (  network_ne			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_ne - ));
+DATA(insert OID = 925 (  network_ne			PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_ne - ));
 DESCR("not equal");
-DATA(insert OID = 926 (  network_cmp		PGUID 12 f t t t 2 f 23 "869 869" 100 0 0 100	network_cmp - ));
+DATA(insert OID = 926 (  network_cmp		PGUID 12 f t t t 2 f 23 "869 869" 100 0 0 100  network_cmp - ));
 DESCR("less-equal-greater");
-DATA(insert OID = 927 (  network_sub		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_sub - ));
+DATA(insert OID = 927 (  network_sub		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_sub - ));
 DESCR("is-subnet");
-DATA(insert OID = 928 (  network_subeq		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_subeq - ));
+DATA(insert OID = 928 (  network_subeq		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_subeq - ));
 DESCR("is-subnet-or-equal");
-DATA(insert OID = 929 (  network_sup		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_sup - ));
+DATA(insert OID = 929 (  network_sup		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_sup - ));
 DESCR("is-supernet");
-DATA(insert OID = 930 (  network_supeq		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100	network_supeq - ));
+DATA(insert OID = 930 (  network_supeq		PGUID 12 f t t t 2 f 16 "869 869" 100 0 0 100  network_supeq - ));
 DESCR("is-supernet-or-equal");
 
 /* inet/cidr functions */
 DATA(insert OID = 605 (  abbrev				PGUID 12 f t t t 1 f 25 "869" 100 0 0 100  network_abbrev - ));
 DESCR("abbreviated display of inet/cidr value");
-DATA(insert OID = 683 (  network			PGUID 12 f t t t 1 f 650 "869" 100 0 0 100	network_network - ));
+DATA(insert OID = 683 (  network			PGUID 12 f t t t 1 f 650 "869" 100 0 0 100  network_network - ));
 DESCR("network part of address");
-DATA(insert OID = 696 (  netmask			PGUID 12 f t t t 1 f 869 "869" 100 0 0 100	network_netmask - ));
+DATA(insert OID = 696 (  netmask			PGUID 12 f t t t 1 f 869 "869" 100 0 0 100  network_netmask - ));
 DESCR("netmask of address");
 DATA(insert OID = 697 (  masklen			PGUID 12 f t t t 1 f 23 "869" 100 0 0 100  network_masklen - ));
 DESCR("netmask length");
-DATA(insert OID = 698 (  broadcast			PGUID 12 f t t t 1 f 869 "869" 100 0 0 100	network_broadcast - ));
+DATA(insert OID = 698 (  broadcast			PGUID 12 f t t t 1 f 869 "869" 100 0 0 100  network_broadcast - ));
 DESCR("broadcast address of network");
 DATA(insert OID = 699 (  host				PGUID 12 f t t t 1 f 25 "869" 100 0 0 100  network_host - ));
 DESCR("show address octets only");
 DATA(insert OID = 730 (  text				PGUID 12 f t t t 1 f 25 "869" 100 0 0 100  network_show - ));
 DESCR("show all parts of inet/cidr value");
-DATA(insert OID = 1713 (  inet				PGUID 12 f t t t 1 f 869 "25" 100 0 0 100	text_inet - ));
+DATA(insert OID = 1713 (  inet				PGUID 12 f t t t 1 f 869 "25" 100 0 0 100  text_inet - ));
 DESCR("text to inet");
-DATA(insert OID = 1714 (  cidr				PGUID 12 f t t t 1 f 650 "25" 100 0 0 100	text_cidr - ));
+DATA(insert OID = 1714 (  cidr				PGUID 12 f t t t 1 f 650 "25" 100 0 0 100  text_cidr - ));
 DESCR("text to cidr");
-DATA(insert OID = 1715 (  set_masklen			PGUID 12 f t t t 2 f 869 "869 23" 100 0 0 100	inet_set_masklen - ));
+DATA(insert OID = 1715 (  set_masklen		PGUID 12 f t t t 2 f 869 "869 23" 100 0 0 100  inet_set_masklen - ));
 DESCR("change the netmask of an inet");
 
+DATA(insert OID = 1690 ( time_mi_time		PGUID 12 f t t t 2 f 1186 "1083 1083" 100 0 0 100  time_mi_time - ));
+DESCR("minus");
+
 DATA(insert OID =  1691 (  boolle			PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  boolle - ));
 DESCR("less-than-or-equal");
 DATA(insert OID =  1692 (  boolge			PGUID 12 f t t t 2 f 16 "16 16" 100 0 0 100  boolge - ));
@@ -2345,9 +2351,9 @@ DESCR("greater-than-or-equal");
 DATA(insert OID = 1693 (  btboolcmp			PGUID 12 f t t t 2 f 23 "16 16" 100 0 0 100  btboolcmp - ));
 DESCR("btree less-equal-greater");
 
-DATA(insert OID = 1696 (  timetz_hash		PGUID 12 f t t t 1 f 23 "1266" 100 0 0 100	timetz_hash - ));
+DATA(insert OID = 1696 (  timetz_hash		PGUID 12 f t t t 1 f 23 "1266" 100 0 0 100  timetz_hash - ));
 DESCR("hash");
-DATA(insert OID = 1697 (  interval_hash		PGUID 12 f t t t 1 f 23 "1186" 100 0 0 100	interval_hash - ));
+DATA(insert OID = 1697 (  interval_hash		PGUID 12 f t t t 1 f 23 "1186" 100 0 0 100  interval_hash - ));
 DESCR("hash");
 
 
@@ -2358,23 +2364,23 @@ DATA(insert OID = 1702 ( numeric_out			PGUID 12 f t t t 1 f 23 "0" 100 0 0 100
 DESCR("(internal)");
 DATA(insert OID = 1703 ( numeric				PGUID 12 f t t t 2 f 1700 "1700 23" 100 0 0 100  numeric - ));
 DESCR("adjust numeric to typmod precision/scale");
-DATA(insert OID = 1704 ( numeric_abs			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_abs - ));
+DATA(insert OID = 1704 ( numeric_abs			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_abs - ));
 DESCR("absolute value");
-DATA(insert OID = 1705 ( abs					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_abs - ));
+DATA(insert OID = 1705 ( abs					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_abs - ));
 DESCR("absolute value");
-DATA(insert OID = 1706 ( sign					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_sign - ));
+DATA(insert OID = 1706 ( sign					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_sign - ));
 DESCR("sign of value");
 DATA(insert OID = 1707 ( round					PGUID 12 f t t t 2 f 1700 "1700 23" 100 0 0 100  numeric_round - ));
 DESCR("value rounded to 'scale'");
-DATA(insert OID = 1708 ( round					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100	"select round($1,0)" - ));
+DATA(insert OID = 1708 ( round					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100  "select round($1,0)" - ));
 DESCR("value rounded to 'scale' of zero");
 DATA(insert OID = 1709 ( trunc					PGUID 12 f t t t 2 f 1700 "1700 23" 100 0 0 100  numeric_trunc - ));
 DESCR("value truncated to 'scale'");
-DATA(insert OID = 1710 ( trunc					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100	"select trunc($1,0)" - ));
+DATA(insert OID = 1710 ( trunc					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100  "select trunc($1,0)" - ));
 DESCR("value truncated to 'scale' of zero");
-DATA(insert OID = 1711 ( ceil					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_ceil - ));
+DATA(insert OID = 1711 ( ceil					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_ceil - ));
 DESCR("smallest integer >= value");
-DATA(insert OID = 1712 ( floor					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_floor - ));
+DATA(insert OID = 1712 ( floor					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_floor - ));
 DESCR("largest integer <= value");
 DATA(insert OID = 1718 ( numeric_eq				PGUID 12 f t t t 2 f 16 "1700 1700" 100 0 0 100  numeric_eq - ));
 DESCR("equal");
@@ -2400,17 +2406,17 @@ DATA(insert OID = 1728 ( mod					PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 1
 DESCR("modulus");
 DATA(insert OID = 1729 ( numeric_mod			PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 100  numeric_mod - ));
 DESCR("modulus");
-DATA(insert OID = 1730 ( sqrt					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_sqrt - ));
+DATA(insert OID = 1730 ( sqrt					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_sqrt - ));
 DESCR("square root");
-DATA(insert OID = 1731 ( numeric_sqrt			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_sqrt - ));
+DATA(insert OID = 1731 ( numeric_sqrt			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_sqrt - ));
 DESCR("square root");
-DATA(insert OID = 1732 ( exp					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_exp - ));
+DATA(insert OID = 1732 ( exp					PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_exp - ));
 DESCR("e raised to the power of n");
-DATA(insert OID = 1733 ( numeric_exp			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_exp - ));
+DATA(insert OID = 1733 ( numeric_exp			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_exp - ));
 DESCR("e raised to the power of n");
-DATA(insert OID = 1734 ( ln						PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_ln - ));
+DATA(insert OID = 1734 ( ln						PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_ln - ));
 DESCR("natural logarithm of n");
-DATA(insert OID = 1735 ( numeric_ln				PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_ln - ));
+DATA(insert OID = 1735 ( numeric_ln				PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_ln - ));
 DESCR("natural logarithm of n");
 DATA(insert OID = 1736 ( log					PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 100  numeric_log - ));
 DESCR("logarithm base m of n");
@@ -2420,15 +2426,15 @@ DATA(insert OID = 1738 ( pow					PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 1
 DESCR("m raised to the power of n");
 DATA(insert OID = 1739 ( numeric_power			PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 100  numeric_power - ));
 DESCR("m raised to the power of n");
-DATA(insert OID = 1740 ( numeric				PGUID 12 f t t t 1 f 1700 "23" 100 0 0 100	int4_numeric - ));
+DATA(insert OID = 1740 ( numeric				PGUID 12 f t t t 1 f 1700 "23" 100 0 0 100  int4_numeric - ));
 DESCR("(internal)");
-DATA(insert OID = 1741 ( log					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100	"select log(10, $1)" - ));
+DATA(insert OID = 1741 ( log					PGUID 14 f t t t 1 f 1700 "1700" 100 0 0 100  "select log(10, $1)" - ));
 DESCR("logarithm base 10 of n");
 DATA(insert OID = 1742 ( numeric				PGUID 12 f t t t 1 f 1700 "700" 100 0 0 100  float4_numeric - ));
 DESCR("(internal)");
 DATA(insert OID = 1743 ( numeric				PGUID 12 f t t t 1 f 1700 "701" 100 0 0 100  float8_numeric - ));
 DESCR("(internal)");
-DATA(insert OID = 1744 ( int4					PGUID 12 f t t t 1 f 23 "1700" 100 0 0 100	numeric_int4 - ));
+DATA(insert OID = 1744 ( int4					PGUID 12 f t t t 1 f 23 "1700" 100 0 0 100  numeric_int4 - ));
 DESCR("(internal)");
 DATA(insert OID = 1745 ( float4					PGUID 12 f t t t 1 f 700 "1700" 100 0 0 100  numeric_float4 - ));
 DESCR("(internal)");
@@ -2444,7 +2450,7 @@ DESCR("plus");
 DATA(insert OID = 1750 ( timetz_mi_interval		PGUID 12 f t t t 2 f 1266 "1266 1186" 100 0 0 100  timetz_mi_interval - ));
 DESCR("minus");
 
-DATA(insert OID = 1764 ( numeric_inc			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_inc - ));
+DATA(insert OID = 1764 ( numeric_inc			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_inc - ));
 DESCR("increment by one");
 DATA(insert OID = 1766 ( numeric_smaller		PGUID 12 f t t t 2 f 1700 "1700 1700" 100 0 0 100  numeric_smaller - ));
 DESCR("smaller of two numbers");
@@ -2452,25 +2458,25 @@ DATA(insert OID = 1767 ( numeric_larger			PGUID 12 f t t t 2 f 1700 "1700 1700"
 DESCR("larger of two numbers");
 DATA(insert OID = 1769 ( numeric_cmp			PGUID 12 f t t t 2 f 23 "1700 1700" 100 0 0 100  numeric_cmp - ));
 DESCR("compare two numbers");
-DATA(insert OID = 1771 ( numeric_uminus			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100	numeric_uminus - ));
+DATA(insert OID = 1771 ( numeric_uminus			PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_uminus - ));
 DESCR("negate");
-DATA(insert OID = 1779 ( int8					PGUID 12 f t t t 1 f 20 "1700" 100 0 0 100	numeric_int8 - ));
+DATA(insert OID = 1779 ( int8					PGUID 12 f t t t 1 f 20 "1700" 100 0 0 100  numeric_int8 - ));
 DESCR("(internal)");
-DATA(insert OID = 1781 ( numeric				PGUID 12 f t t t 1 f 1700 "20" 100 0 0 100	int8_numeric - ));
+DATA(insert OID = 1781 ( numeric				PGUID 12 f t t t 1 f 1700 "20" 100 0 0 100  int8_numeric - ));
 DESCR("(internal)");
-DATA(insert OID = 1782 ( numeric				PGUID 12 f t t t 1 f 1700 "21" 100 0 0 100	int2_numeric - ));
+DATA(insert OID = 1782 ( numeric				PGUID 12 f t t t 1 f 1700 "21" 100 0 0 100  int2_numeric - ));
 DESCR("(internal)");
-DATA(insert OID = 1783 ( int2					PGUID 12 f t t t 1 f 21 "1700" 100 0 0 100	numeric_int2 - ));
+DATA(insert OID = 1783 ( int2					PGUID 12 f t t t 1 f 21 "1700" 100 0 0 100  numeric_int2 - ));
 DESCR("(internal)");
 
 /* formatting */
-DATA(insert OID = 1770 ( to_char			PGUID 12 f t f t 2 f	25 "1184 25" 100 0 0 100  timestamp_to_char - ));
+DATA(insert OID = 1770 ( to_char			PGUID 12 f t f t 2 f	25 "1184 25" 100 0 0 100  timestamptz_to_char - ));
 DESCR("format timestamp to text");
 DATA(insert OID = 1772 ( to_char			PGUID 12 f t f t 2 f	25 "1700 25" 100 0 0 100  numeric_to_char - ));
 DESCR("format numeric to text");
-DATA(insert OID = 1773 ( to_char			PGUID 12 f t f t 2 f	25 "23 25" 100 0 0 100	int4_to_char - ));
+DATA(insert OID = 1773 ( to_char			PGUID 12 f t f t 2 f	25 "23 25" 100 0 0 100  int4_to_char - ));
 DESCR("format int4 to text");
-DATA(insert OID = 1774 ( to_char			PGUID 12 f t f t 2 f	25 "20 25" 100 0 0 100	int8_to_char - ));
+DATA(insert OID = 1774 ( to_char			PGUID 12 f t f t 2 f	25 "20 25" 100 0 0 100  int8_to_char - ));
 DESCR("format int8 to text");
 DATA(insert OID = 1775 ( to_char			PGUID 12 f t f t 2 f	25 "700 25" 100 0 0 100  float4_to_char - ));
 DESCR("format float4 to text");
@@ -2478,7 +2484,7 @@ DATA(insert OID = 1776 ( to_char			PGUID 12 f t f t 2 f	25 "701 25" 100 0 0 100
 DESCR("format float8 to text");
 DATA(insert OID = 1777 ( to_number			PGUID 12 f t f t 2 f	1700 "25 25" 100 0 0 100  numeric_to_number - ));
 DESCR("convert text to numeric");
-DATA(insert OID = 1778 ( to_timestamp			PGUID 12 f t f t 2 f	1184 "25 25" 100 0 0 100  to_timestamp - ));
+DATA(insert OID = 1778 ( to_timestamp		PGUID 12 f t f t 2 f	1184 "25 25" 100 0 0 100  to_timestamp - ));
 DESCR("convert text to timestamp");
 DATA(insert OID = 1780 ( to_date			PGUID 12 f t f t 2 f	1082 "25 25" 100 0 0 100  to_date - ));
 DESCR("convert text to date");
@@ -2490,9 +2496,9 @@ DESCR("quote an identifier for usage in a querystring");
 DATA(insert OID =  1283 ( quote_literal    PGUID 12 f t t t 1 f 25 "25" 100 0 0 100 quote_literal - ));
 DESCR("quote a literal for usage in a querystring");
 
-DATA(insert OID = 1798 (  oidin			   PGUID 12 f t t t 1 f 26 "0" 100 0 0 100	oidin - ));
+DATA(insert OID = 1798 (  oidin			   PGUID 12 f t t t 1 f 26 "0" 100 0 0 100  oidin - ));
 DESCR("(internal)");
-DATA(insert OID = 1799 (  oidout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100	oidout - ));
+DATA(insert OID = 1799 (  oidout		   PGUID 12 f t t t 1 f 23 "0" 100 0 0 100  oidout - ));
 DESCR("(internal)");
 
 
@@ -2508,9 +2514,9 @@ DATA(insert OID = 1814 ( iclikesel			PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0
 DESCR("restriction selectivity of ILIKE");
 DATA(insert OID = 1815 ( icnlikesel			PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  icnlikesel - ));
 DESCR("restriction selectivity of NOT ILIKE");
-DATA(insert OID = 1816 ( iclikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	iclikejoinsel - ));
+DATA(insert OID = 1816 ( iclikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  iclikejoinsel - ));
 DESCR("join selectivity of ILIKE");
-DATA(insert OID = 1817 ( icnlikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	icnlikejoinsel - ));
+DATA(insert OID = 1817 ( icnlikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  icnlikejoinsel - ));
 DESCR("join selectivity of NOT ILIKE");
 DATA(insert OID = 1818 ( regexeqsel			PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  regexeqsel - ));
 DESCR("restriction selectivity of regex match");
@@ -2524,33 +2530,33 @@ DATA(insert OID = 1822 ( nlikesel			PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0
 DESCR("restriction selectivity of NOT LIKE");
 DATA(insert OID = 1823 ( icregexnesel		PGUID 12 f t f t 4 f 701 "0 26 0 23" 100 0 0 100  icregexnesel - ));
 DESCR("restriction selectivity of case-insensitive regex non-match");
-DATA(insert OID = 1824 ( regexeqjoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	regexeqjoinsel - ));
+DATA(insert OID = 1824 ( regexeqjoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  regexeqjoinsel - ));
 DESCR("join selectivity of regex match");
-DATA(insert OID = 1825 ( likejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	likejoinsel - ));
+DATA(insert OID = 1825 ( likejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  likejoinsel - ));
 DESCR("join selectivity of LIKE");
-DATA(insert OID = 1826 ( icregexeqjoinsel	PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	icregexeqjoinsel - ));
+DATA(insert OID = 1826 ( icregexeqjoinsel	PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  icregexeqjoinsel - ));
 DESCR("join selectivity of case-insensitive regex match");
-DATA(insert OID = 1827 ( regexnejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	regexnejoinsel - ));
+DATA(insert OID = 1827 ( regexnejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  regexnejoinsel - ));
 DESCR("join selectivity of regex non-match");
-DATA(insert OID = 1828 ( nlikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	nlikejoinsel - ));
+DATA(insert OID = 1828 ( nlikejoinsel		PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  nlikejoinsel - ));
 DESCR("join selectivity of NOT LIKE");
-DATA(insert OID = 1829 ( icregexnejoinsel	PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100	icregexnejoinsel - ));
+DATA(insert OID = 1829 ( icregexnejoinsel	PGUID 12 f t f t 3 f 701 "0 26 0" 100 0 0 100  icregexnejoinsel - ));
 DESCR("join selectivity of case-insensitive regex non-match");
 
 /* Aggregate-related functions */
-DATA(insert OID = 1830 (  float8_avg	   PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100	float8_avg - ));
+DATA(insert OID = 1830 (  float8_avg	   PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100  float8_avg - ));
 DESCR("AVG aggregate final function");
-DATA(insert OID = 1831 (  float8_variance  PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100	float8_variance - ));
+DATA(insert OID = 1831 (  float8_variance  PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100  float8_variance - ));
 DESCR("VARIANCE aggregate final function");
-DATA(insert OID = 1832 (  float8_stddev    PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100	float8_stddev - ));
+DATA(insert OID = 1832 (  float8_stddev    PGUID 12 f t t t 1 f 701 "1022" 100 0 0 100  float8_stddev - ));
 DESCR("STDDEV aggregate final function");
 DATA(insert OID = 1833 (  numeric_accum    PGUID 12 f t t t 2 f 1231 "1231 1700" 100 0 0 100  numeric_accum - ));
 DESCR("aggregate transition function");
-DATA(insert OID = 1834 (  int2_accum	   PGUID 12 f t t t 2 f 1231 "1231 21" 100 0 0 100	int2_accum - ));
+DATA(insert OID = 1834 (  int2_accum	   PGUID 12 f t t t 2 f 1231 "1231 21" 100 0 0 100  int2_accum - ));
 DESCR("aggregate transition function");
-DATA(insert OID = 1835 (  int4_accum	   PGUID 12 f t t t 2 f 1231 "1231 23" 100 0 0 100	int4_accum - ));
+DATA(insert OID = 1835 (  int4_accum	   PGUID 12 f t t t 2 f 1231 "1231 23" 100 0 0 100  int4_accum - ));
 DESCR("aggregate transition function");
-DATA(insert OID = 1836 (  int8_accum	   PGUID 12 f t t t 2 f 1231 "1231 20" 100 0 0 100	int8_accum - ));
+DATA(insert OID = 1836 (  int8_accum	   PGUID 12 f t t t 2 f 1231 "1231 20" 100 0 0 100  int8_accum - ));
 DESCR("aggregate transition function");
 DATA(insert OID = 1837 (  numeric_avg	   PGUID 12 f t t t 1 f 1700 "1231" 100 0 0 100  numeric_avg - ));
 DESCR("AVG aggregate final function");
@@ -2558,19 +2564,19 @@ DATA(insert OID = 1838 (  numeric_variance PGUID 12 f t t t 1 f 1700 "1231" 100
 DESCR("VARIANCE aggregate final function");
 DATA(insert OID = 1839 (  numeric_stddev   PGUID 12 f t t t 1 f 1700 "1231" 100 0 0 100  numeric_stddev - ));
 DESCR("STDDEV aggregate final function");
-DATA(insert OID = 1840 (  int2_sum		   PGUID 12 f t t f 2 f 20 "20 21" 100 0 0 100	int2_sum - ));
+DATA(insert OID = 1840 (  int2_sum		   PGUID 12 f t t f 2 f 20 "20 21" 100 0 0 100  int2_sum - ));
 DESCR("SUM(int2) transition function");
-DATA(insert OID = 1841 (  int4_sum		   PGUID 12 f t t f 2 f 20 "20 23" 100 0 0 100	int4_sum - ));
+DATA(insert OID = 1841 (  int4_sum		   PGUID 12 f t t f 2 f 20 "20 23" 100 0 0 100  int4_sum - ));
 DESCR("SUM(int4) transition function");
-DATA(insert OID = 1842 (  int8_sum		   PGUID 12 f t t f 2 f 1700 "1700 20" 100 0 0 100	int8_sum - ));
+DATA(insert OID = 1842 (  int8_sum		   PGUID 12 f t t f 2 f 1700 "1700 20" 100 0 0 100  int8_sum - ));
 DESCR("SUM(int8) transition function");
 DATA(insert OID = 1843 (  interval_accum   PGUID 12 f t t t 2 f 1187 "1187 1186" 100 0 0 100  interval_accum - ));
 DESCR("aggregate transition function");
 DATA(insert OID = 1844 (  interval_avg	   PGUID 12 f t t t 1 f 1186 "1187" 100 0 0 100  interval_avg - ));
 DESCR("AVG aggregate final function");
-DATA(insert OID = 1962 (  int2_avg_accum   PGUID 12 f t t t 2 f 1016 "1016 21" 100 0 0 100	int2_avg_accum - ));
+DATA(insert OID = 1962 (  int2_avg_accum   PGUID 12 f t t t 2 f 1016 "1016 21" 100 0 0 100  int2_avg_accum - ));
 DESCR("AVG(int2) transition function");
-DATA(insert OID = 1963 (  int4_avg_accum   PGUID 12 f t t t 2 f 1016 "1016 23" 100 0 0 100	int4_avg_accum - ));
+DATA(insert OID = 1963 (  int4_avg_accum   PGUID 12 f t t t 2 f 1016 "1016 23" 100 0 0 100  int4_avg_accum - ));
 DESCR("AVG(int4) transition function");
 DATA(insert OID = 1964 (  int8_avg		   PGUID 12 f t t t 1 f 1700 "1016" 100 0 0 100  int8_avg - ));
 DESCR("AVG(int) aggregate final function");
@@ -2578,77 +2584,77 @@ DESCR("AVG(int) aggregate final function");
 /* To ASCII conversion */
 DATA(insert OID = 1845 ( to_ascii	PGUID 12 f t t t 1 f	25 "25" 100 0 0 100  to_ascii_default - ));
 DESCR("encode text from DB encoding to ASCII text");
-DATA(insert OID = 1846 ( to_ascii	PGUID 12 f t t t 2 f	25 "25 23" 100 0 0 100	to_ascii_enc - ));
+DATA(insert OID = 1846 ( to_ascii	PGUID 12 f t t t 2 f	25 "25 23" 100 0 0 100  to_ascii_enc - ));
 DESCR("encode text from encoding to ASCII text");
-DATA(insert OID = 1847 ( to_ascii	PGUID 12 f t t t 2 f	25 "25 19" 100 0 0 100	to_ascii_encname - ));
+DATA(insert OID = 1847 ( to_ascii	PGUID 12 f t t t 2 f	25 "25 19" 100 0 0 100  to_ascii_encname - ));
 DESCR("encode text from encoding to ASCII text");
 
 DATA(insert OID = 1848 ( interval_pl_time		PGUID 12 f t t t 2 f 1083 "1186 1083" 100 0 0 100  interval_pl_time - ));
 DESCR("plus");
 
-DATA(insert OID = 1850 (  int28eq		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28eq - ));
+DATA(insert OID = 1850 (  int28eq		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28eq - ));
 DESCR("equal");
-DATA(insert OID = 1851 (  int28ne		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28ne - ));
+DATA(insert OID = 1851 (  int28ne		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28ne - ));
 DESCR("not equal");
-DATA(insert OID = 1852 (  int28lt		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28lt - ));
+DATA(insert OID = 1852 (  int28lt		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28lt - ));
 DESCR("less-than");
-DATA(insert OID = 1853 (  int28gt		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28gt - ));
+DATA(insert OID = 1853 (  int28gt		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1854 (  int28le		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28le - ));
+DATA(insert OID = 1854 (  int28le		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1855 (  int28ge		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100	int28ge - ));
+DATA(insert OID = 1855 (  int28ge		   PGUID 12 f t t t 2 f 16 "21 20" 100 0 0 100  int28ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 1856 (  int82eq		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82eq - ));
+DATA(insert OID = 1856 (  int82eq		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82eq - ));
 DESCR("equal");
-DATA(insert OID = 1857 (  int82ne		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82ne - ));
+DATA(insert OID = 1857 (  int82ne		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82ne - ));
 DESCR("not equal");
-DATA(insert OID = 1858 (  int82lt		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82lt - ));
+DATA(insert OID = 1858 (  int82lt		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82lt - ));
 DESCR("less-than");
-DATA(insert OID = 1859 (  int82gt		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82gt - ));
+DATA(insert OID = 1859 (  int82gt		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82gt - ));
 DESCR("greater-than");
-DATA(insert OID = 1860 (  int82le		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82le - ));
+DATA(insert OID = 1860 (  int82le		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82le - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1861 (  int82ge		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100	int82ge - ));
+DATA(insert OID = 1861 (  int82ge		   PGUID 12 f t t t 2 f 16 "20 21" 100 0 0 100  int82ge - ));
 DESCR("greater-than-or-equal");
 
-DATA(insert OID = 1892 (  int2and		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2and - ));
+DATA(insert OID = 1892 (  int2and		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2and - ));
 DESCR("binary and");
-DATA(insert OID = 1893 (  int2or		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2or - ));
+DATA(insert OID = 1893 (  int2or		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2or - ));
 DESCR("binary or");
-DATA(insert OID = 1894 (  int2xor		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100	int2xor - ));
+DATA(insert OID = 1894 (  int2xor		   PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100  int2xor - ));
 DESCR("binary xor");
 DATA(insert OID = 1895 (  int2not		   PGUID 12 f t t t 1 f 21 "21" 100 0 0 100  int2not - ));
 DESCR("binary not");
-DATA(insert OID = 1896 (  int2shl		   PGUID 12 f t t t 2 f 21 "21 23" 100 0 0 100	int2shl - ));
+DATA(insert OID = 1896 (  int2shl		   PGUID 12 f t t t 2 f 21 "21 23" 100 0 0 100  int2shl - ));
 DESCR("binary shift left");
-DATA(insert OID = 1897 (  int2shr		   PGUID 12 f t t t 2 f 21 "21 23" 100 0 0 100	int2shr - ));
+DATA(insert OID = 1897 (  int2shr		   PGUID 12 f t t t 2 f 21 "21 23" 100 0 0 100  int2shr - ));
 DESCR("binary shift right");
 
-DATA(insert OID = 1898 (  int4and		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4and - ));
+DATA(insert OID = 1898 (  int4and		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4and - ));
 DESCR("binary and");
-DATA(insert OID = 1899 (  int4or		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4or - ));
+DATA(insert OID = 1899 (  int4or		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4or - ));
 DESCR("binary or");
-DATA(insert OID = 1900 (  int4xor		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4xor - ));
+DATA(insert OID = 1900 (  int4xor		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4xor - ));
 DESCR("binary xor");
 DATA(insert OID = 1901 (  int4not		   PGUID 12 f t t t 1 f 23 "23" 100 0 0 100  int4not - ));
 DESCR("binary not");
-DATA(insert OID = 1902 (  int4shl		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4shl - ));
+DATA(insert OID = 1902 (  int4shl		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4shl - ));
 DESCR("binary shift left");
-DATA(insert OID = 1903 (  int4shr		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100	int4shr - ));
+DATA(insert OID = 1903 (  int4shr		   PGUID 12 f t t t 2 f 23 "23 23" 100 0 0 100  int4shr - ));
 DESCR("binary shift right");
 
-DATA(insert OID = 1904 (  int8and		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8and - ));
+DATA(insert OID = 1904 (  int8and		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8and - ));
 DESCR("binary and");
-DATA(insert OID = 1905 (  int8or		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8or - ));
+DATA(insert OID = 1905 (  int8or		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8or - ));
 DESCR("binary or");
-DATA(insert OID = 1906 (  int8xor		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100	int8xor - ));
+DATA(insert OID = 1906 (  int8xor		   PGUID 12 f t t t 2 f 20 "20 20" 100 0 0 100  int8xor - ));
 DESCR("binary xor");
 DATA(insert OID = 1907 (  int8not		   PGUID 12 f t t t 1 f 20 "20" 100 0 0 100  int8not - ));
 DESCR("binary not");
-DATA(insert OID = 1908 (  int8shl		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int8shl - ));
+DATA(insert OID = 1908 (  int8shl		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int8shl - ));
 DESCR("binary shift left");
-DATA(insert OID = 1909 (  int8shr		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100	int8shr - ));
+DATA(insert OID = 1909 (  int8shr		   PGUID 12 f t t t 2 f 20 "20 23" 100 0 0 100  int8shr - ));
 DESCR("binary shift right");
 
 DATA(insert OID = 1910 (  int8up		   PGUID 12 f t t t 1 f 20  "20"   100 0 0 100  int8up - ));
@@ -2664,80 +2670,80 @@ DESCR("unary plus");
 DATA(insert OID = 1915 (  numeric_uplus	   PGUID 12 f t t t 1 f 1700 "1700" 100 0 0 100  numeric_uplus - ));
 DESCR("unary plus");
 
-DATA(insert OID = 1922 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "19 19 25" 100 0 0 100	has_table_privilege_name_name - ));
+DATA(insert OID = 1922 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "19 19 25" 100 0 0 100  has_table_privilege_name_name - ));
 DESCR("user privilege on relation by username, relname");
-DATA(insert OID = 1923 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "19 26 25" 100 0 0 100	has_table_privilege_name_id - ));
+DATA(insert OID = 1923 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "19 26 25" 100 0 0 100  has_table_privilege_name_id - ));
 DESCR("user privilege on relation by username, rel oid");
-DATA(insert OID = 1924 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "23 19 25" 100 0 0 100	has_table_privilege_id_name - ));
+DATA(insert OID = 1924 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "23 19 25" 100 0 0 100  has_table_privilege_id_name - ));
 DESCR("user privilege on relation by usesysid, relname");
-DATA(insert OID = 1925 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "23 26 25" 100 0 0 100	has_table_privilege_id_id - ));
+DATA(insert OID = 1925 (  has_table_privilege		   PGUID 12 f t f t 3 f 16 "23 26 25" 100 0 0 100  has_table_privilege_id_id - ));
 DESCR("user privilege on relation by usesysid, rel oid");
-DATA(insert OID = 1926 (  has_table_privilege		   PGUID 12 f t f t 2 f 16 "19 25" 100 0 0 100	has_table_privilege_name - ));
+DATA(insert OID = 1926 (  has_table_privilege		   PGUID 12 f t f t 2 f 16 "19 25" 100 0 0 100  has_table_privilege_name - ));
 DESCR("current user privilege on relation by relname");
-DATA(insert OID = 1927 (  has_table_privilege		   PGUID 12 f t f t 2 f 16 "26 25" 100 0 0 100	has_table_privilege_id - ));
+DATA(insert OID = 1927 (  has_table_privilege		   PGUID 12 f t f t 2 f 16 "26 25" 100 0 0 100  has_table_privilege_id - ));
 DESCR("current user privilege on relation by rel oid");
 
 
-DATA(insert OID = 1928 (  pg_stat_get_numscans			PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_numscans - ));
+DATA(insert OID = 1928 (  pg_stat_get_numscans			PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_numscans - ));
 DESCR("Statistics: Number of scans done for table/index");
-DATA(insert OID = 1929 (  pg_stat_get_tuples_returned	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_tuples_returned - ));
+DATA(insert OID = 1929 (  pg_stat_get_tuples_returned	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_tuples_returned - ));
 DESCR("Statistics: Number of tuples read by seqscan");
-DATA(insert OID = 1930 (  pg_stat_get_tuples_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_tuples_fetched - ));
+DATA(insert OID = 1930 (  pg_stat_get_tuples_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_tuples_fetched - ));
 DESCR("Statistics: Number of tuples fetched by idxscan");
-DATA(insert OID = 1931 (  pg_stat_get_tuples_inserted	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_tuples_inserted - ));
+DATA(insert OID = 1931 (  pg_stat_get_tuples_inserted	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_tuples_inserted - ));
 DESCR("Statistics: Number of tuples inserted");
-DATA(insert OID = 1932 (  pg_stat_get_tuples_updated	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_tuples_updated - ));
+DATA(insert OID = 1932 (  pg_stat_get_tuples_updated	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_tuples_updated - ));
 DESCR("Statistics: Number of tuples updated");
-DATA(insert OID = 1933 (  pg_stat_get_tuples_deleted	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_tuples_deleted - ));
+DATA(insert OID = 1933 (  pg_stat_get_tuples_deleted	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_tuples_deleted - ));
 DESCR("Statistics: Number of tuples deleted");
-DATA(insert OID = 1934 (  pg_stat_get_blocks_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_blocks_fetched - ));
+DATA(insert OID = 1934 (  pg_stat_get_blocks_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_blocks_fetched - ));
 DESCR("Statistics: Number of blocks fetched");
-DATA(insert OID = 1935 (  pg_stat_get_blocks_hit		PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_blocks_hit - ));
+DATA(insert OID = 1935 (  pg_stat_get_blocks_hit		PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_blocks_hit - ));
 DESCR("Statistics: Number of blocks found in cache");
-DATA(insert OID = 1936 (  pg_stat_get_backend_idset		PGUID 12 f t f t 0 t 23 "" 100 0 0 100	pg_stat_get_backend_idset - ));
+DATA(insert OID = 1936 (  pg_stat_get_backend_idset		PGUID 12 f t f t 0 t 23 "" 100 0 0 100  pg_stat_get_backend_idset - ));
 DESCR("Statistics: Currently active backend IDs");
-DATA(insert OID = 1937 (  pg_stat_get_backend_pid		PGUID 12 f t f t 1 f 23 "23" 100 0 0 100	pg_stat_get_backend_pid - ));
+DATA(insert OID = 1937 (  pg_stat_get_backend_pid		PGUID 12 f t f t 1 f 23 "23" 100 0 0 100  pg_stat_get_backend_pid - ));
 DESCR("Statistics: PID of backend");
-DATA(insert OID = 1938 (  pg_stat_get_backend_dbid		PGUID 12 f t f t 1 f 26 "23" 100 0 0 100	pg_stat_get_backend_dbid - ));
+DATA(insert OID = 1938 (  pg_stat_get_backend_dbid		PGUID 12 f t f t 1 f 26 "23" 100 0 0 100  pg_stat_get_backend_dbid - ));
 DESCR("Statistics: Database ID of backend");
-DATA(insert OID = 1939 (  pg_stat_get_backend_userid	PGUID 12 f t f t 1 f 26 "23" 100 0 0 100	pg_stat_get_backend_userid - ));
+DATA(insert OID = 1939 (  pg_stat_get_backend_userid	PGUID 12 f t f t 1 f 26 "23" 100 0 0 100  pg_stat_get_backend_userid - ));
 DESCR("Statistics: User ID of backend");
-DATA(insert OID = 1940 (  pg_stat_get_backend_activity	PGUID 12 f t f t 1 f 25 "23" 100 0 0 100	pg_stat_get_backend_activity - ));
+DATA(insert OID = 1940 (  pg_stat_get_backend_activity	PGUID 12 f t f t 1 f 25 "23" 100 0 0 100  pg_stat_get_backend_activity - ));
 DESCR("Statistics: Current query of backend");
-DATA(insert OID = 1941 (  pg_stat_get_db_numbackends	PGUID 12 f t f t 1 f 23 "26" 100 0 0 100	pg_stat_get_db_numbackends - ));
+DATA(insert OID = 1941 (  pg_stat_get_db_numbackends	PGUID 12 f t f t 1 f 23 "26" 100 0 0 100  pg_stat_get_db_numbackends - ));
 DESCR("Statistics: Number of backends in database");
-DATA(insert OID = 1942 (  pg_stat_get_db_xact_commit	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_db_xact_commit - ));
+DATA(insert OID = 1942 (  pg_stat_get_db_xact_commit	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_db_xact_commit - ));
 DESCR("Statistics: Transactions committed");
-DATA(insert OID = 1943 (  pg_stat_get_db_xact_rollback	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_db_xact_rollback - ));
+DATA(insert OID = 1943 (  pg_stat_get_db_xact_rollback	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_db_xact_rollback - ));
 DESCR("Statistics: Transactions rolled back");
-DATA(insert OID = 1944 (  pg_stat_get_db_blocks_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_db_blocks_fetched - ));
+DATA(insert OID = 1944 (  pg_stat_get_db_blocks_fetched	PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_db_blocks_fetched - ));
 DESCR("Statistics: Blocks fetched for database");
-DATA(insert OID = 1945 (  pg_stat_get_db_blocks_hit		PGUID 12 f t f t 1 f 20 "26" 100 0 0 100	pg_stat_get_db_blocks_hit - ));
+DATA(insert OID = 1945 (  pg_stat_get_db_blocks_hit		PGUID 12 f t f t 1 f 20 "26" 100 0 0 100  pg_stat_get_db_blocks_hit - ));
 DESCR("Statistics: Block found in cache for database");
 
-DATA(insert OID = 1946 (  encode						PGUID 12 f t t t 2 f 25 "17 25" 100 0 0 100	binary_encode - ));
+DATA(insert OID = 1946 (  encode						PGUID 12 f t t t 2 f 25 "17 25" 100 0 0 100  binary_encode - ));
 DESCR("Convert bytea value into some ascii-only text string");
-DATA(insert OID = 1947 (  decode						PGUID 12 f t t t 2 f 17 "25 25" 100 0 0 100	binary_decode - ));
+DATA(insert OID = 1947 (  decode						PGUID 12 f t t t 2 f 17 "25 25" 100 0 0 100  binary_decode - ));
 DESCR("Convert ascii-encoded text string into bytea value");
 
-DATA(insert OID = 1948 (  byteaeq		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	byteaeq - ));
+DATA(insert OID = 1948 (  byteaeq		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  byteaeq - ));
 DESCR("equal");
-DATA(insert OID = 1949 (  bytealt		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	bytealt - ));
+DATA(insert OID = 1949 (  bytealt		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  bytealt - ));
 DESCR("less-than");
-DATA(insert OID = 1950 (  byteale		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	byteale - ));
+DATA(insert OID = 1950 (  byteale		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  byteale - ));
 DESCR("less-than-or-equal");
-DATA(insert OID = 1951 (  byteagt		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	byteagt - ));
+DATA(insert OID = 1951 (  byteagt		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  byteagt - ));
 DESCR("greater-than");
-DATA(insert OID = 1952 (  byteage		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	byteage - ));
+DATA(insert OID = 1952 (  byteage		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  byteage - ));
 DESCR("greater-than-or-equal");
-DATA(insert OID = 1953 (  byteane		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100	byteane - ));
+DATA(insert OID = 1953 (  byteane		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100  byteane - ));
 DESCR("not equal");
-DATA(insert OID = 1954 (  byteacmp		   PGUID 12 f t t t 2 f 23 "17 17" 100 0 0 100	byteacmp - ));
+DATA(insert OID = 1954 (  byteacmp		   PGUID 12 f t t t 2 f 23 "17 17" 100 0 0 100  byteacmp - ));
 DESCR("less-equal-greater");
 
-DATA(insert OID = 1965 (  oidlarger		   PGUID 12 f t t t 2 f 26 "26 26" 100 0 0 100	oidlarger - ));
+DATA(insert OID = 1965 (  oidlarger		   PGUID 12 f t t t 2 f 26 "26 26" 100 0 0 100  oidlarger - ));
 DESCR("larger of two");
-DATA(insert OID = 1966 (  oidsmaller	   PGUID 12 f t t t 2 f 26 "26 26" 100 0 0 100	oidsmaller - ));
+DATA(insert OID = 1966 (  oidsmaller	   PGUID 12 f t t t 2 f 26 "26 26" 100 0 0 100  oidsmaller - ));
 DESCR("smaller of two");
 
 DATA(insert OID = 2005 (  bytealike		   PGUID 12 f t t t 2 f 16 "17 17" 100 0 0 100 bytealike - ));
@@ -2763,6 +2769,87 @@ DESCR("return position of substring");
 DATA(insert OID = 2015 (  btrim			   PGUID 12 f t t t 2 f 17 "17 17" 100 0 0 100	byteatrim - ));
 DESCR("trim both ends of string");
  
+DATA(insert OID = 2020 (  date_trunc		PGUID 12 f t t t 2 f 1114 "25 1114" 100 0 0 100  timestamp_trunc - ));
+DESCR("truncate timestamp to specified units");
+DATA(insert OID = 2021 (  date_part			PGUID 12 f t t t 2 f  701 "25 1114" 100 0 0 100  timestamp_part - ));
+DESCR("extract field from timestamp");
+DATA(insert OID = 2022 (  timestamp			PGUID 12 f t f t 1 f 1114 "25" 100 0 0 100  text_timestamp - ));
+DESCR("convert text to timestamp");
+DATA(insert OID = 2023 (  timestamp			PGUID 12 f t f t 1 f 1114 "702" 100 0 0 100  abstime_timestamp - ));
+DESCR("convert abstime to timestamp");
+DATA(insert OID = 2024 (  timestamp			PGUID 12 f t t t 1 f 1114 "1082" 100 0 0 100  date_timestamp - ));
+DESCR("convert date to timestamp");
+DATA(insert OID = 2025 (  timestamp			PGUID 12 f t t t 2 f 1114 "1082 1083" 100 0 0 100  datetime_timestamp - ));
+DESCR("convert date and time to timestamp");
+DATA(insert OID = 2026 (  timestamp			PGUID 14 f t t t 1 f 1114 "1114" 100 0 0 100  "select $1" - ));
+DESCR("convert (noop)");
+DATA(insert OID = 2027 (  timestamp			PGUID 12 f t f t 1 f 1114 "1184" 100 0 0 100  timestamptz_timestamp - ));
+DESCR("convert date and time with time zone to timestamp");
+DATA(insert OID = 2028 (  timestamptz		PGUID 12 f t f t 1 f 1184 "1114" 100 0 0 100  timestamp_timestamptz - ));
+DESCR("convert date and time with time zone to timestamp");
+DATA(insert OID = 2029 (  date				PGUID 12 f t t t 1 f 1082 "1114" 100 0 0 100  timestamp_date - ));
+DESCR("convert timestamp to date");
+DATA(insert OID = 2030 (  abstime			PGUID 12 f t f t 1 f  702 "1114" 100 0 0 100  timestamp_abstime - ));
+DESCR("convert timestamp to abstime");
+DATA(insert OID = 2031 (  timestamp_mi		PGUID 12 f t t t 2 f 1186 "1114 1114" 100 0 0 100  timestamp_mi - ));
+DESCR("subtract");
+DATA(insert OID = 2032 (  timestamp_pl_span PGUID 12 f t t t 2 f 1114 "1114 1186" 100 0 0 100  timestamp_pl_span - ));
+DESCR("plus");
+DATA(insert OID = 2033 (  timestamp_mi_span PGUID 12 f t t t 2 f 1114 "1114 1186" 100 0 0 100  timestamp_mi_span - ));
+DESCR("minus");
+DATA(insert OID = 2034 (  text				PGUID 12 f t t t 1 f   25 "1114" 100 0 0 100  timestamp_text - ));
+DESCR("convert timestamp to text");
+DATA(insert OID = 2035 (  timestamp_smaller PGUID 12 f t t t 2 f 1114 "1114 1114" 100 0 0 100  timestamp_smaller - ));
+DESCR("smaller of two");
+DATA(insert OID = 2036 (  timestamp_larger	PGUID 12 f t t t 2 f 1114 "1114 1114" 100 0 0 100  timestamp_larger - ));
+DESCR("larger of two");
+DATA(insert OID = 2037 (  timetz			PGUID 12 f t f t 2 f 1266 "25 1266" 100 0 0 100  timetz_zone - ));
+DESCR("time with time zone");
+DATA(insert OID = 2038 (  timetz			PGUID 12 f t t t 2 f 1266 "1186 1266" 100 0 0 100  timetz_izone - ));
+DESCR("time with time zone");
+DATA(insert OID = 2041 ( overlaps			PGUID 12 f t t f 4 f 16 "1114 1114 1114 1114" 100 0 0 100  overlaps_timestamp - ));
+DESCR("SQL92 interval comparison");
+DATA(insert OID = 2042 ( overlaps			PGUID 14 f t t f 4 f 16 "1114 1186 1114 1186" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))" - ));
+DESCR("SQL92 interval comparison");
+DATA(insert OID = 2043 ( overlaps			PGUID 14 f t t f 4 f 16 "1114 1114 1114 1186" 100 0 0 100  "select ($1, $2) overlaps ($3, ($3 + $4))" - ));
+DESCR("SQL92 interval comparison");
+DATA(insert OID = 2044 ( overlaps			PGUID 14 f t t f 4 f 16 "1114 1186 1114 1114" 100 0 0 100  "select ($1, ($1 + $2)) overlaps ($3, $4)" - ));
+DESCR("SQL92 interval comparison");
+DATA(insert OID = 2045 (  timestamp_cmp		PGUID 12 f t t t 2 f	23 "1114 1114" 100 0 0 100  timestamp_cmp - ));
+DESCR("less-equal-greater");
+DATA(insert OID = 2046 (  time				PGUID 12 f t t t 1 f 1083 "1266" 100 0 0 100  timetz_time - ));
+DESCR("convert time with time zone to time");
+DATA(insert OID = 2047 (  timetz			PGUID 12 f t f t 1 f 1266 "1083" 100 0 0 100  time_timetz - ));
+DESCR("convert time to timetz");
+DATA(insert OID = 2048 (  isfinite			PGUID 12 f t t t 1 f   16 "1114" 100 0 0 100  timestamp_finite - ));
+DESCR("boolean test");
+
+DATA(insert OID = 2050 ( interval_mi_time	PGUID 14 f t t t 2 f 1083 "1186 1083" 100 0 0 100  "select $2 - $1 + (interval \'24 hours\')" - ));
+DESCR("minus");
+DATA(insert OID = 2051 ( interval_mi_timetz	PGUID 14 f t t t 2 f 1266 "1186 1266" 100 0 0 100  "select $2 - $1 + (interval \'24 hours\')" - ));
+DESCR("minus");
+DATA(insert OID = 2052 (  timestamp_eq		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_eq - ));
+DESCR("equal");
+DATA(insert OID = 2053 (  timestamp_ne		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_ne - ));
+DESCR("not equal");
+DATA(insert OID = 2054 (  timestamp_lt		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_lt - ));
+DESCR("less-than");
+DATA(insert OID = 2055 (  timestamp_le		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_le - ));
+DESCR("less-than-or-equal");
+DATA(insert OID = 2056 (  timestamp_ge		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_ge - ));
+DESCR("greater-than-or-equal");
+DATA(insert OID = 2057 (  timestamp_gt		PGUID 12 f t t t 2 f 16 "1114 1114" 100 0 0 100  timestamp_gt - ));
+DESCR("greater-than");
+DATA(insert OID = 2058 (  age				PGUID 12 f t t t 2 f 1186 "1114 1114" 100 0 0 100  timestamp_age - ));
+DESCR("date difference preserving months and years");
+DATA(insert OID = 2059 (  age				PGUID 14 f t t t 1 f 1186 "1114" 100 0 0 100  "select age(\'today\', $1)" - ));
+DESCR("date difference from today preserving months and years");
+DATA(insert OID = 2069 (  timezone			PGUID 12 f t t t 2 f 1184 "25 1114" 100 0 0 100  timestamp_zone - ));
+DESCR("time zone");
+DATA(insert OID = 2070 (  timezone			PGUID 12 f t t t 2 f 1184 "1186 1114" 100 0 0 100  timestamp_izone - ));
+DESCR("time zone");
+
+
 /*
  * prototypes for functions pg_proc.c
  */
@@ -2781,4 +2868,4 @@ extern Oid ProcedureCreate(char *procedureName,
 				int32 outin_ratio,
 				List *argList);
 
-#endif	 /* PG_PROC_H */
+#endif  /* PG_PROC_H */
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 912a47a96c94f279bc21e008d0fec46a920c326f..8b653a73e452de886a1e9d6ebba6ee39e39b60d3 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_type.h,v 1.111 2001/09/06 02:07:42 tgl Exp $
+ * $Id: pg_type.h,v 1.112 2001/09/28 08:09:14 thomas Exp $
  *
  * NOTES
  *	  the genbki.sh script reads this file and generates .bki
@@ -395,12 +395,16 @@ DESCR("hh:mm:ss, ANSI SQL time");
 #define TIMEOID			1083
 
 /* OIDS 1100 - 1199 */
+DATA(insert OID = 1114 ( timestamp	 PGUID	8  47 f b t \054 0	0 timestamp_in timestamp_out timestamp_in timestamp_out d p _null_ ));
+DESCR("date and time");
+#define TIMESTAMPOID	1114
+DATA(insert OID = 1115 ( _timestamp  PGUID	-1 -1 f b t \054 0	1184 array_in array_out array_in array_out d x _null_ ));
 DATA(insert OID = 1182 ( _date		 PGUID	-1 -1 f b t \054 0	1082 array_in array_out array_in array_out i x _null_ ));
 DATA(insert OID = 1183 ( _time		 PGUID	-1 -1 f b t \054 0	1083 array_in array_out array_in array_out d x _null_ ));
-DATA(insert OID = 1184 ( timestamp	 PGUID	8  47 f b t \054 0	0 timestamp_in timestamp_out timestamp_in timestamp_out d p _null_ ));
-DESCR("date and time");
-#define TIMESTAMPOID	1184
-DATA(insert OID = 1185 ( _timestamp  PGUID	-1 -1 f b t \054 0	1184 array_in array_out array_in array_out d x _null_ ));
+DATA(insert OID = 1184 ( timestamptz PGUID	8  47 f b t \054 0	0 timestamptz_in timestamptz_out timestamptz_in timestamptz_out d p _null_ ));
+DESCR("date and time with time zone");
+#define TIMESTAMPTZOID	1184
+DATA(insert OID = 1185 ( _timestamptz PGUID	-1 -1 f b t \054 0	1184 array_in array_out array_in array_out d x _null_ ));
 DATA(insert OID = 1186 ( interval	 PGUID 12  47 f b t \054 0	0 interval_in interval_out interval_in interval_out d p _null_ ));
 DESCR("@ <number> <units>, time interval");
 #define INTERVALOID		1186
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 671d72684d5d79fa57924a000602fbf145d385f1..0f0c9e15a8a927b4a2bd2767d03b368c1351c99f 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: builtins.h,v 1.164 2001/09/14 17:46:40 momjian Exp $
+ * $Id: builtins.h,v 1.165 2001/09/28 08:09:14 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,7 +16,7 @@
 
 #include "fmgr.h"
 #include "nodes/primnodes.h"
-
+#include "storage/itemptr.h"  /* for setLastTid() */
 
 /*
  *		Defined in adt/
@@ -345,6 +345,7 @@ extern char *deparse_expression(Node *expr, List *dpcontext,
 extern List *deparse_context_for(char *relname, Oid relid);
 
 /* tid.c */
+extern void  setLastTid(const ItemPointer tid);
 extern Datum tidin(PG_FUNCTION_ARGS);
 extern Datum tidout(PG_FUNCTION_ARGS);
 extern Datum tideq(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/date.h b/src/include/utils/date.h
index 5aeb87ee00e279bc300cbb08b5ee9faf5927eff1..cc58cf97470a5ddc6b65c22010397f324d676d67 100644
--- a/src/include/utils/date.h
+++ b/src/include/utils/date.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: date.h,v 1.11 2001/03/22 04:01:11 momjian Exp $
+ * $Id: date.h,v 1.12 2001/09/28 08:09:14 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -68,6 +68,8 @@ extern Datum date_pli(PG_FUNCTION_ARGS);
 extern Datum date_mii(PG_FUNCTION_ARGS);
 extern Datum date_timestamp(PG_FUNCTION_ARGS);
 extern Datum timestamp_date(PG_FUNCTION_ARGS);
+extern Datum date_timestamptz(PG_FUNCTION_ARGS);
+extern Datum timestamptz_date(PG_FUNCTION_ARGS);
 extern Datum datetime_timestamp(PG_FUNCTION_ARGS);
 extern Datum abstime_date(PG_FUNCTION_ARGS);
 extern Datum text_date(PG_FUNCTION_ARGS);
@@ -85,6 +87,7 @@ extern Datum time_cmp(PG_FUNCTION_ARGS);
 extern Datum overlaps_time(PG_FUNCTION_ARGS);
 extern Datum time_larger(PG_FUNCTION_ARGS);
 extern Datum time_smaller(PG_FUNCTION_ARGS);
+extern Datum time_mi_time(PG_FUNCTION_ARGS);
 extern Datum timestamp_time(PG_FUNCTION_ARGS);
 extern Datum time_interval(PG_FUNCTION_ARGS);
 extern Datum interval_time(PG_FUNCTION_ARGS);
@@ -107,10 +110,14 @@ extern Datum timetz_hash(PG_FUNCTION_ARGS);
 extern Datum overlaps_timetz(PG_FUNCTION_ARGS);
 extern Datum timetz_larger(PG_FUNCTION_ARGS);
 extern Datum timetz_smaller(PG_FUNCTION_ARGS);
-extern Datum timestamp_timetz(PG_FUNCTION_ARGS);
-extern Datum datetimetz_timestamp(PG_FUNCTION_ARGS);
+extern Datum timetz_time(PG_FUNCTION_ARGS);
+extern Datum time_timetz(PG_FUNCTION_ARGS);
+extern Datum timestamptz_timetz(PG_FUNCTION_ARGS);
+extern Datum datetimetz_timestamptz(PG_FUNCTION_ARGS);
 extern Datum text_timetz(PG_FUNCTION_ARGS);
 extern Datum timetz_text(PG_FUNCTION_ARGS);
+extern Datum timetz_zone(PG_FUNCTION_ARGS);
+extern Datum timetz_izone(PG_FUNCTION_ARGS);
 extern Datum timetz_pl_interval(PG_FUNCTION_ARGS);
 extern Datum timetz_mi_interval(PG_FUNCTION_ARGS);
 
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index d299c042eb1a96a8e56bfe4b689a287ae3396bbd..f2102a21e55aa5e0c3c873ac2e728916f73ab6db 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -9,7 +9,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: datetime.h,v 1.21 2001/08/27 20:02:10 tgl Exp $
+ * $Id: datetime.h,v 1.22 2001/09/28 08:09:14 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -86,7 +86,7 @@
 #define MONTH	1
 #define YEAR	2
 #define DAY		3
-#define TIMES	4				/* not used - thomas 1997-07-14 */
+#define JULIAN	4
 #define TZ		5
 #define DTZ		6
 #define DTZMOD	7
@@ -103,6 +103,8 @@
 #define AGO		17
 #define ABS_BEFORE		18
 #define ABS_AFTER		19
+/* reserved for unrecognized string values */
+#define UNKNOWN_FIELD	31
 
 /*
  * Token field definitions for time parsing and decoding.
@@ -149,12 +151,17 @@
 #define DTK_MILLENNIUM	28
 #define DTK_MILLISEC	29
 #define DTK_MICROSEC	30
+#define DTK_JULIAN		31
 
 #define DTK_DOW			32
 #define DTK_DOY			33
 #define DTK_TZ_HOUR		34
 #define DTK_TZ_MINUTE	35
 
+#define DTK_ISO_DATE	36
+#define DTK_ISO_TIME	37
+
+
 /*
  * Bit mask definitions for time parsing.
  */
@@ -238,6 +245,7 @@ extern int	day_tab[2][13];
 
 
 extern void GetCurrentTime(struct tm * tm);
+extern void GetCurrentTimeUsec(struct tm * tm, double *fsec);
 extern void j2date(int jd, int *year, int *month, int *day);
 extern int	date2j(int year, int month, int day);
 
diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h
index 424bcf0fcba0bff76cf2734e0d9db94532854621..14d3f578ab371359acc4c077f1e42b1466a1921f 100644
--- a/src/include/utils/formatting.h
+++ b/src/include/utils/formatting.h
@@ -2,7 +2,7 @@
 /* -----------------------------------------------------------------------
  * formatting.h
  *
- * $Id: formatting.h,v 1.8 2001/09/06 03:22:42 momjian Exp $
+ * $Id: formatting.h,v 1.9 2001/09/28 08:09:14 thomas Exp $
  *
  *
  *	 Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
@@ -22,6 +22,7 @@
 
 
 extern Datum timestamp_to_char(PG_FUNCTION_ARGS);
+extern Datum timestamptz_to_char(PG_FUNCTION_ARGS);
 extern Datum interval_to_char(PG_FUNCTION_ARGS);
 extern Datum to_timestamp(PG_FUNCTION_ARGS);
 extern Datum to_date(PG_FUNCTION_ARGS);
diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h
index d5343e5a14c30d516ea87345fdfb4c183c4e403d..299c7dbc604030e3c766ccea5d7fcbfe64d7ba58 100644
--- a/src/include/utils/nabstime.h
+++ b/src/include/utils/nabstime.h
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: nabstime.h,v 1.30 2001/05/03 19:00:37 tgl Exp $
+ * $Id: nabstime.h,v 1.31 2001/09/28 08:09:14 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -74,11 +74,8 @@ typedef TimeIntervalData *TimeInterval;
  * These were chosen as special 32-bit bit patterns,
  *	so redefine them explicitly using these bit patterns. - tgl 97/02/24
  */
-#define EPOCH_ABSTIME	((AbsoluteTime) 0)
 #define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE)		/* 2147483647 (2^31 - 1) */
-#define CURRENT_ABSTIME ((AbsoluteTime) 0x7FFFFFFD)		/* 2147483646 (2^31 - 2) */
 #define NOEND_ABSTIME	((AbsoluteTime) 0x7FFFFFFC)		/* 2147483645 (2^31 - 3) */
-#define BIG_ABSTIME		((AbsoluteTime) 0x7FFFFFFB)		/* 2147483644 (2^31 - 4) */
 #define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)		/* -2147483648 */
 
 #define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE)		/* 2147483647 (2^31 - 1) */
@@ -116,6 +113,8 @@ extern Datum abstime_finite(PG_FUNCTION_ARGS);
 
 extern Datum timestamp_abstime(PG_FUNCTION_ARGS);
 extern Datum abstime_timestamp(PG_FUNCTION_ARGS);
+extern Datum timestamptz_abstime(PG_FUNCTION_ARGS);
+extern Datum abstime_timestamptz(PG_FUNCTION_ARGS);
 
 extern Datum reltimein(PG_FUNCTION_ARGS);
 extern Datum reltimeout(PG_FUNCTION_ARGS);
@@ -158,6 +157,7 @@ extern Datum timeofday(PG_FUNCTION_ARGS);
 
 /* non-fmgr-callable support routines */
 extern AbsoluteTime GetCurrentAbsoluteTime(void);
+extern AbsoluteTime GetCurrentAbsoluteTimeUsec(int *usec);
 extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn);
 
 #endif	 /* NABSTIME_H */
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 11b650c88ac1252d6947a4e290af4ddd2e3f724b..51189ec4013e21e5b1dbb125bdc5a8a8f7bbd6af 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: timestamp.h,v 1.17 2001/09/06 03:22:42 momjian Exp $
+ * $Id: timestamp.h,v 1.18 2001/09/28 08:09:14 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -33,12 +33,12 @@
 
 typedef double Timestamp;
 
+typedef double TimestampTz;
+
 typedef struct
 {
-	double		time;			/* all time units other than months and
-								 * years */
-	int32		month;			/* months and years, after time for
-								 * alignment */
+	double		time;	/* all time units other than months and years */
+	int32		month;	/* months and years, after time for alignment */
 } Interval;
 
 
@@ -49,23 +49,22 @@ typedef struct
  * Therefore Timestamp is pass-by-reference if and only if float8 is!
  */
 #define DatumGetTimestamp(X)  ((Timestamp) DatumGetFloat8(X))
+#define DatumGetTimestampTz(X)  ((Timestamp) DatumGetFloat8(X))
 #define DatumGetIntervalP(X)  ((Interval *) DatumGetPointer(X))
 
-#define TimestampGetDatum(X)  Float8GetDatum(X)
-#define IntervalPGetDatum(X)  PointerGetDatum(X)
+#define TimestampGetDatum(X) Float8GetDatum(X)
+#define TimestampTzGetDatum(X) Float8GetDatum(X)
+#define IntervalPGetDatum(X) PointerGetDatum(X)
 
-#define PG_GETARG_TIMESTAMP(n)	DatumGetTimestamp(PG_GETARG_DATUM(n))
+#define PG_GETARG_TIMESTAMP(n) DatumGetTimestamp(PG_GETARG_DATUM(n))
+#define PG_GETARG_TIMESTAMPTZ(n) DatumGetTimestampTz(PG_GETARG_DATUM(n))
 #define PG_GETARG_INTERVAL_P(n) DatumGetIntervalP(PG_GETARG_DATUM(n))
 
-#define PG_RETURN_TIMESTAMP(x)	return TimestampGetDatum(x)
+#define PG_RETURN_TIMESTAMP(x) return TimestampGetDatum(x)
+#define PG_RETURN_TIMESTAMPTZ(x) return TimestampTzGetDatum(x)
 #define PG_RETURN_INTERVAL_P(x) return IntervalPGetDatum(x)
 
 
-#ifdef NAN
-#define DT_INVALID		(NAN)
-#else
-#define DT_INVALID		(DBL_MIN+DBL_MIN)
-#endif
 #ifdef HUGE_VAL
 #define DT_NOBEGIN		(-HUGE_VAL)
 #define DT_NOEND		(HUGE_VAL)
@@ -73,15 +72,6 @@ typedef struct
 #define DT_NOBEGIN		(-DBL_MAX)
 #define DT_NOEND		(DBL_MAX)
 #endif
-#define DT_CURRENT		(DBL_MIN)
-#define DT_EPOCH		(-DBL_MIN)
-
-#define TIMESTAMP_INVALID(j)	do {j = DT_INVALID;} while (0)
-#ifdef NAN
-#define TIMESTAMP_IS_INVALID(j) (isnan(j))
-#else
-#define TIMESTAMP_IS_INVALID(j) ((j) == DT_INVALID)
-#endif
 
 #define TIMESTAMP_NOBEGIN(j)	do {j = DT_NOBEGIN;} while (0)
 #define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)
@@ -89,24 +79,7 @@ typedef struct
 #define TIMESTAMP_NOEND(j)		do {j = DT_NOEND;} while (0)
 #define TIMESTAMP_IS_NOEND(j)	((j) == DT_NOEND)
 
-#define TIMESTAMP_CURRENT(j)	do {j = DT_CURRENT;} while (0)
-#define TIMESTAMP_IS_CURRENT(j) ((j) == DT_CURRENT)
-
-#define TIMESTAMP_EPOCH(j)		do {j = DT_EPOCH;} while (0)
-#define TIMESTAMP_IS_EPOCH(j)	((j) == DT_EPOCH)
-
-#define TIMESTAMP_IS_RELATIVE(j) (TIMESTAMP_IS_CURRENT(j) || TIMESTAMP_IS_EPOCH(j))
-#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_INVALID(j) \
-								|| TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
-#define TIMESTAMP_IS_RESERVED(j) (TIMESTAMP_IS_RELATIVE(j) || TIMESTAMP_NOT_FINITE(j))
-
-#define INTERVAL_INVALID(j)		do {(j).time = DT_INVALID;} while (0)
-#ifdef NAN
-#define INTERVAL_IS_INVALID(j)	(isnan((j).time))
-#else
-#define INTERVAL_IS_INVALID(j)	((j).time == DT_INVALID)
-#endif
-#define INTERVAL_NOT_FINITE(j)	INTERVAL_IS_INVALID(j)
+#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
 
 #define TIME_PREC_INV 1000000.0
 #define JROUND(j) (rint(((double) (j))*TIME_PREC_INV)/TIME_PREC_INV)
@@ -153,6 +126,14 @@ extern Datum timestamp_part(PG_FUNCTION_ARGS);
 extern Datum interval_part(PG_FUNCTION_ARGS);
 extern Datum timestamp_zone(PG_FUNCTION_ARGS);
 extern Datum timestamp_izone(PG_FUNCTION_ARGS);
+extern Datum timestamp_timestamptz(PG_FUNCTION_ARGS);
+
+extern Datum timestamptz_in(PG_FUNCTION_ARGS);
+extern Datum timestamptz_out(PG_FUNCTION_ARGS);
+extern Datum timestamptz_timestamp(PG_FUNCTION_ARGS);
+extern Datum timestamptz_zone(PG_FUNCTION_ARGS);
+extern Datum timestamptz_izone(PG_FUNCTION_ARGS);
+extern Datum timestamptz_timestamptz(PG_FUNCTION_ARGS);
 
 extern Datum interval_um(PG_FUNCTION_ARGS);
 extern Datum interval_pl(PG_FUNCTION_ARGS);
@@ -169,18 +150,28 @@ extern Datum timestamp_mi_span(PG_FUNCTION_ARGS);
 extern Datum timestamp_age(PG_FUNCTION_ARGS);
 extern Datum overlaps_timestamp(PG_FUNCTION_ARGS);
 
+extern Datum timestamptz_text(PG_FUNCTION_ARGS);
+extern Datum text_timestamptz(PG_FUNCTION_ARGS);
+extern Datum timestamptz_pl_span(PG_FUNCTION_ARGS);
+extern Datum timestamptz_mi_span(PG_FUNCTION_ARGS);
+extern Datum timestamptz_age(PG_FUNCTION_ARGS);
+extern Datum timestamptz_trunc(PG_FUNCTION_ARGS);
+extern Datum timestamptz_part(PG_FUNCTION_ARGS);
+
 extern Datum now(PG_FUNCTION_ARGS);
 
 /* Internal routines (not fmgr-callable) */
 
 extern int	tm2timestamp(struct tm * tm, double fsec, int *tzp, Timestamp *dt);
-extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm,
-			 double *fsec, char **tzn);
+extern int	timestamp2tm(Timestamp dt, int *tzp, struct tm * tm,
+						 double *fsec, char **tzn);
+extern void	dt2time(Timestamp dt, int *hour, int *min, double *sec);
 
 extern int	interval2tm(Interval span, struct tm * tm, float8 *fsec);
 extern int	tm2interval(struct tm * tm, double fsec, Interval *span);
 
-extern Timestamp SetTimestamp(Timestamp timestamp);
+extern Timestamp SetEpochTimestamp(void);
+extern void GetEpochTime(struct tm * tm);
 
 extern void isoweek2date(int woy, int *year, int *mon, int *mday);
 extern int	date2isoweek(int year, int mon, int mday);