Index: contrib/spi/refint.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/contrib/spi/refint.c,v
retrieving revision 1.13
diff -c -r1.13 refint.c
*** contrib/spi/refint.c	2000/12/03 20:45:31	1.13
--- contrib/spi/refint.c	2001/03/23 04:37:25
***************
*** 399,417 ****
  		{
  			relname = args2[0];
  
! 			/*
! 			 * For 'R'estrict action we construct SELECT query - SELECT 1
! 			 * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =
! 			 * $2 [...]] - to check is tuple referenced or not.
  			 */
  			if (action == 'r')
  
  				sprintf(sql, "select 1 from %s where ", relname);
  
! 			/*
! 			 * For 'C'ascade action we construct DELETE query - DELETE
! 			 * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =
! 			 * $2 [...]] - to delete all referencing tuples.
  			 */
  
  			/*
--- 399,427 ----
  		{
  			relname = args2[0];
  
! 			/*---------
! 			 * For 'R'estrict action we construct SELECT query:
! 			 *
! 			 *  SELECT 1
! 			 *	FROM _referencing_relation_
! 			 *	WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
! 			 *
! 			 *  to check is tuple referenced or not.
! 			 *---------
  			 */
  			if (action == 'r')
  
  				sprintf(sql, "select 1 from %s where ", relname);
  
! 			/*---------
! 			 * For 'C'ascade action we construct DELETE query
! 			 *
! 			 *	DELETE
! 			 *	FROM _referencing_relation_
! 			 *	WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
! 			 *
! 			 * to delete all referencing tuples.
! 			 *---------
  			 */
  
  			/*
Index: src/backend/access/gist/gistscan.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/gist/gistscan.c,v
retrieving revision 1.32
diff -c -r1.32 gistscan.c
*** src/backend/access/gist/gistscan.c	2001/03/22 03:59:12	1.32
--- src/backend/access/gist/gistscan.c	2001/03/23 04:37:26
***************
*** 143,151 ****
  			for (i = 0; i < s->numberOfKeys; i++)
  			{
  
! 				/*
  				 * s->keyData[i].sk_procedure =
! 				 * index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC);
  				 */
  				s->keyData[i].sk_procedure
  					= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
--- 143,152 ----
  			for (i = 0; i < s->numberOfKeys; i++)
  			{
  
! 				/*----------
  				 * s->keyData[i].sk_procedure =
! 				 * 		index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC);
! 				 *----------
  				 */
  				s->keyData[i].sk_procedure
  					= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
Index: src/backend/access/hash/hashsearch.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v
retrieving revision 1.25
diff -c -r1.25 hashsearch.c
*** src/backend/access/hash/hashsearch.c	2001/01/24 19:42:47	1.25
--- src/backend/access/hash/hashsearch.c	2001/03/23 04:37:26
***************
*** 334,342 ****
  				while (offnum > maxoff)
  				{
  
! 					/*
! 					 * either this page is empty (maxoff ==
! 					 * InvalidOffsetNumber) or we ran off the end.
  					 */
  					_hash_readnext(rel, &buf, &page, &opaque);
  					if (BufferIsInvalid(buf))
--- 334,344 ----
  				while (offnum > maxoff)
  				{
  
! 					/*--------
! 					 * either this page is empty
! 					 * (maxoff == InvalidOffsetNumber)
! 					 * or we ran off the end.
! 					 *--------
  					 */
  					_hash_readnext(rel, &buf, &page, &opaque);
  					if (BufferIsInvalid(buf))
***************
*** 382,390 ****
  				while (offnum < FirstOffsetNumber)
  				{
  
! 					/*
! 					 * either this page is empty (offnum ==
! 					 * InvalidOffsetNumber) or we ran off the end.
  					 */
  					_hash_readprev(rel, &buf, &page, &opaque);
  					if (BufferIsInvalid(buf))
--- 384,394 ----
  				while (offnum < FirstOffsetNumber)
  				{
  
! 					/*---------
! 					 * either this page is empty
! 					 * (offnum == InvalidOffsetNumber)
! 					 * or we ran off the end.
! 					 *---------
  					 */
  					_hash_readprev(rel, &buf, &page, &opaque);
  					if (BufferIsInvalid(buf))
Index: src/backend/access/heap/tuptoaster.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v
retrieving revision 1.19
diff -c -r1.19 tuptoaster.c
*** src/backend/access/heap/tuptoaster.c	2001/03/22 06:16:07	1.19
--- src/backend/access/heap/tuptoaster.c	2001/03/23 04:37:26
***************
*** 458,466 ****
  		int32		biggest_size = MAXALIGN(sizeof(varattrib));
  		Datum		old_value;
  
! 		/*
! 		 * Search for the biggest yet inlined attribute with attstorage =
! 		 * 'x' or 'e'
  		 */
  		for (i = 0; i < numAttrs; i++)
  		{
--- 458,467 ----
  		int32		biggest_size = MAXALIGN(sizeof(varattrib));
  		Datum		old_value;
  
! 		/*------
! 		 * Search for the biggest yet inlined attribute with
! 		 * attstorage equals 'x' or 'e'
! 		 *------
  		 */
  		for (i = 0; i < numAttrs; i++)
  		{
***************
*** 572,580 ****
  		int32		biggest_size = MAXALIGN(sizeof(varattrib));
  		Datum		old_value;
  
! 		/*
! 		 * Search for the biggest yet inlined attribute with attstorage =
! 		 * 'm'
  		 */
  		for (i = 0; i < numAttrs; i++)
  		{
--- 573,582 ----
  		int32		biggest_size = MAXALIGN(sizeof(varattrib));
  		Datum		old_value;
  
! 		/*--------
! 		 * Search for the biggest yet inlined attribute with
! 		 * attstorage = 'm'
! 		 *--------
  		 */
  		for (i = 0; i < numAttrs; i++)
  		{
Index: src/backend/access/nbtree/nbtsearch.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v
retrieving revision 1.65
diff -c -r1.65 nbtsearch.c
*** src/backend/access/nbtree/nbtsearch.c	2001/03/22 06:16:07	1.65
--- src/backend/access/nbtree/nbtsearch.c	2001/03/23 04:37:27
***************
*** 584,591 ****
  
  	/*
  	 * At this point we are positioned at the first item >= scan key, or
! 	 * possibly at the end of a page on which all the existing items are <
! 	 * scan key and we know that everything on later pages is >= scan key.
  	 * We could step forward in the latter case, but that'd be a waste of
  	 * time if we want to scan backwards.  So, it's now time to examine
  	 * the scan strategy to find the exact place to start the scan.
--- 584,593 ----
  
  	/*
  	 * At this point we are positioned at the first item >= scan key, or
! 	 * possibly at the end of a page on which all the existing items are 
! 	 * greater than the scan key and we know that everything on later pages
! 	 * is less than or equal to scan key.
!      *
  	 * We could step forward in the latter case, but that'd be a waste of
  	 * time if we want to scan backwards.  So, it's now time to examine
  	 * the scan strategy to find the exact place to start the scan.
Index: src/backend/access/nbtree/nbtutils.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v
retrieving revision 1.43
diff -c -r1.43 nbtutils.c
*** src/backend/access/nbtree/nbtutils.c	2001/03/22 03:59:15	1.43
--- src/backend/access/nbtree/nbtutils.c	2001/03/23 04:37:27
***************
*** 412,419 ****
  			if (DatumGetBool(test))
  				xform[j].sk_argument = cur->sk_argument;
  			else if (j == (BTEqualStrategyNumber - 1))
! 				so->qual_ok = false;	/* key == a && key == b, but a !=
! 										 * b */
  		}
  		else
  		{
--- 412,419 ----
  			if (DatumGetBool(test))
  				xform[j].sk_argument = cur->sk_argument;
  			else if (j == (BTEqualStrategyNumber - 1))
! 				so->qual_ok = false;
! 			/* key == a && key == b, but a != b */
  		}
  		else
  		{
Index: src/backend/commands/command.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/command.c,v
retrieving revision 1.124
diff -c -r1.124 command.c
*** src/backend/commands/command.c	2001/03/22 06:16:11	1.124
--- src/backend/commands/command.c	2001/03/23 04:37:28
***************
*** 1034,1044 ****
  	ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid,
  						   F_OIDEQ, ObjectIdGetDatum(myrelid));
  
! 	/*
  	 * Oops pg_attrdef doesn't have (adrelid,adnum) index
! 	 * ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum,
! 	 * F_INT2EQ, Int16GetDatum(attnum)); sysscan =
! 	 * systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys);
  	 */
  	sysscan = systable_beginscan(adrel, AttrDefaultIndex, 1, scankeys);
  	while (HeapTupleIsValid(tup = systable_getnext(sysscan)))
--- 1034,1046 ----
  	ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid,
  						   F_OIDEQ, ObjectIdGetDatum(myrelid));
  
! 	/*--------
  	 * Oops pg_attrdef doesn't have (adrelid,adnum) index
! 	 *
! 	 *	ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum,
! 	 * 								F_INT2EQ, Int16GetDatum(attnum));
! 	 *	sysscan = systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys);
! 	 *--------
  	 */
  	sysscan = systable_beginscan(adrel, AttrDefaultIndex, 1, scankeys);
  	while (HeapTupleIsValid(tup = systable_getnext(sysscan)))
Index: src/backend/commands/_deadcode/version.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/_deadcode/version.c,v
retrieving revision 1.25
diff -c -r1.25 version.c
*** src/backend/commands/_deadcode/version.c	2001/01/24 19:42:53	1.25
--- src/backend/commands/_deadcode/version.c	2001/03/23 04:37:29
***************
*** 77,85 ****
  eval_as_new_xact(char *query)
  {
  
! 	/*
  	 * WARNING! do not uncomment the following lines WARNING!
! 	 * CommitTransactionCommand(); StartTransactionCommand();
  	 */
  	CommandCounterIncrement();
  	pg_exec_query(query);
--- 77,88 ----
  eval_as_new_xact(char *query)
  {
  
! 	/*------
  	 * WARNING! do not uncomment the following lines WARNING!
! 	 *
! 	 *	CommitTransactionCommand();
! 	 *	StartTransactionCommand();
! 	 *------
  	 */
  	CommandCounterIncrement();
  	pg_exec_query(query);
Index: src/backend/executor/execQual.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/execQual.c,v
retrieving revision 1.84
diff -c -r1.84 execQual.c
*** src/backend/executor/execQual.c	2001/03/22 03:59:26	1.84
--- src/backend/executor/execQual.c	2001/03/23 04:37:30
***************
*** 1499,1506 ****
  	 * and another array that holds the isDone status for each targetlist
  	 * item. The isDone status is needed so that we can iterate,
  	 * generating multiple tuples, when one or more tlist items return
! 	 * sets.  (We expect the caller to call us again if we return *isDone
! 	 * = ExprMultipleResult.)
  	 */
  	if (nodomains > NPREALLOCDOMAINS)
  	{
--- 1499,1507 ----
  	 * and another array that holds the isDone status for each targetlist
  	 * item. The isDone status is needed so that we can iterate,
  	 * generating multiple tuples, when one or more tlist items return
! 	 * sets.  (We expect the caller to call us again if we return:
! 	 *
! 	 *	isDone = ExprMultipleResult.)
  	 */
  	if (nodomains > NPREALLOCDOMAINS)
  	{
Index: src/backend/executor/nodeLimit.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeLimit.c,v
retrieving revision 1.5
diff -c -r1.5 nodeLimit.c
*** src/backend/executor/nodeLimit.c	2001/03/22 06:16:13	1.5
--- src/backend/executor/nodeLimit.c	2001/03/23 04:37:30
***************
*** 79,86 ****
  		 * tuple in the offset region before we can return NULL.
  		 * Otherwise we won't be correctly aligned to start going forward
  		 * again.  So, although you might think we can quit when position
! 		 * = offset + 1, we have to fetch a subplan tuple first, and then
! 		 * exit when position = offset.
  		 */
  		if (ScanDirectionIsForward(direction))
  		{
--- 79,86 ----
  		 * tuple in the offset region before we can return NULL.
  		 * Otherwise we won't be correctly aligned to start going forward
  		 * again.  So, although you might think we can quit when position
! 		 * equals offset + 1, we have to fetch a subplan tuple first, and
! 		 * then exit when position = offset.
  		 */
  		if (ScanDirectionIsForward(direction))
  		{
Index: src/backend/executor/nodeMergejoin.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v
retrieving revision 1.44
diff -c -r1.44 nodeMergejoin.c
*** src/backend/executor/nodeMergejoin.c	2001/03/22 06:16:13	1.44
--- src/backend/executor/nodeMergejoin.c	2001/03/23 04:37:31
***************
*** 240,249 ****
  			break;
  		}
  
! 		/*
  		 * ok, the compare clause failed so we test if the keys are
! 		 * equal... if key1 != key2, we return false. otherwise key1 =
! 		 * key2 so we move on to the next pair of keys.
  		 */
  		const_value = ExecEvalExpr((Node *) lfirst(eqclause),
  								   econtext,
--- 240,250 ----
  			break;
  		}
  
! 		/*-----------
  		 * ok, the compare clause failed so we test if the keys are
! 		 * equal... if key1 != key2, we return false. otherwise
! 		 * key1 = key2 so we move on to the next pair of keys.
! 		 *-----------
  		 */
  		const_value = ExecEvalExpr((Node *) lfirst(eqclause),
  								   econtext,
Index: src/backend/optimizer/path/clausesel.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v
retrieving revision 1.42
diff -c -r1.42 clausesel.c
*** src/backend/optimizer/path/clausesel.c	2001/03/22 03:59:34	1.42
--- src/backend/optimizer/path/clausesel.c	2001/03/23 04:37:31
***************
*** 297,305 ****
  			else
  			{
  
! 				/*
! 				 * We have found two similar clauses, such as x < y AND x
! 				 * < z.  Keep only the more restrictive one.
  				 */
  				if (rqelem->lobound > s2)
  					rqelem->lobound = s2;
--- 297,307 ----
  			else
  			{
  
! 				/*------
! 				 * We have found two similar clauses, such as
! 				 * x < y AND x < z.
! 				 * Keep only the more restrictive one.
! 				 *------
  				 */
  				if (rqelem->lobound > s2)
  					rqelem->lobound = s2;
***************
*** 315,323 ****
  			else
  			{
  
! 				/*
! 				 * We have found two similar clauses, such as x > y AND x
! 				 * > z.  Keep only the more restrictive one.
  				 */
  				if (rqelem->hibound > s2)
  					rqelem->hibound = s2;
--- 317,327 ----
  			else
  			{
  
! 				/*------
! 				 * We have found two similar clauses, such as
! 				 * x > y AND x > z.
! 				 * Keep only the more restrictive one.
! 				 *------
  				 */
  				if (rqelem->hibound > s2)
  					rqelem->hibound = s2;
Index: src/backend/optimizer/path/indxpath.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v
retrieving revision 1.103
diff -c -r1.103 indxpath.c
*** src/backend/optimizer/path/indxpath.c	2001/03/22 03:59:35	1.103
--- src/backend/optimizer/path/indxpath.c	2001/03/23 04:37:33
***************
*** 1986,1994 ****
  	expr = make_opclause(op, leftop, (Var *) con);
  	result = makeList1(expr);
  
! 	/*
! 	 * If we can create a string larger than the prefix, we can say "x <
! 	 * greaterstr".
  	 */
  	greaterstr = make_greater_string(prefix, datatype);
  	if (greaterstr)
--- 1986,1995 ----
  	expr = make_opclause(op, leftop, (Var *) con);
  	result = makeList1(expr);
  
! 	/*-------
! 	 * If we can create a string larger than the prefix, we can say
! 	 * "x < greaterstr".
! 	 *-------
  	 */
  	greaterstr = make_greater_string(prefix, datatype);
  	if (greaterstr)
Index: src/backend/rewrite/rewriteDefine.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v
retrieving revision 1.60
diff -c -r1.60 rewriteDefine.c
*** src/backend/rewrite/rewriteDefine.c	2001/03/22 06:16:16	1.60
--- src/backend/rewrite/rewriteDefine.c	2001/03/23 04:37:33
***************
*** 130,139 ****
  
  #ifdef NOT_USED
  
! 	/*
  	 * on retrieve to class.attribute do instead nothing is converted to
! 	 * 'on retrieve to class.attribute do instead retrieve (attribute =
! 	 * NULL)' --- this is also a terrible hack that works well -- glass
  	 */
  	if (is_instead && !*action && eslot_string && event_type == CMD_SELECT)
  	{
--- 130,143 ----
  
  #ifdef NOT_USED
  
! 	/*---------
  	 * on retrieve to class.attribute do instead nothing is converted to
! 	 * 'on retrieve to class.attribute do instead:
! 	 *
! 	 *	 retrieve (attribute = NULL)'
! 	 *
! 	 * this is also a terrible hack that works well -- glass
! 	 *---------
  	 */
  	if (is_instead && !*action && eslot_string && event_type == CMD_SELECT)
  	{
Index: src/backend/storage/ipc/ipc.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v
retrieving revision 1.65
diff -c -r1.65 ipc.c
*** src/backend/storage/ipc/ipc.c	2001/03/22 06:16:16	1.65
--- src/backend/storage/ipc/ipc.c	2001/03/23 04:37:34
***************
*** 404,410 ****
  	 * and entering the semop() call.  If a cancel/die interrupt occurs in
  	 * that window, we would fail to notice it until after we acquire the
  	 * lock (or get another interrupt to escape the semop()).  We can
! 	 * avoid this problem by temporarily setting ImmediateInterruptOK =
  	 * true before we do CHECK_FOR_INTERRUPTS; then, a die() interrupt in
  	 * this interval will execute directly.  However, there is a huge
  	 * pitfall: there is another window of a few instructions after the
--- 404,410 ----
  	 * and entering the semop() call.  If a cancel/die interrupt occurs in
  	 * that window, we would fail to notice it until after we acquire the
  	 * lock (or get another interrupt to escape the semop()).  We can
! 	 * avoid this problem by temporarily setting ImmediateInterruptOK to
  	 * true before we do CHECK_FOR_INTERRUPTS; then, a die() interrupt in
  	 * this interval will execute directly.  However, there is a huge
  	 * pitfall: there is another window of a few instructions after the
Index: src/backend/storage/ipc/sinval.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v
retrieving revision 1.28
diff -c -r1.28 sinval.c
*** src/backend/storage/ipc/sinval.c	2001/03/22 03:59:45	1.28
--- src/backend/storage/ipc/sinval.c	2001/03/23 04:37:34
***************
*** 319,329 ****
  				xid < FirstTransactionId || xid >= snapshot->xmax)
  			{
  
! 				/*
! 				 * Seems that there is no sense to store xid >=
! 				 * snapshot->xmax (what we got from ReadNewTransactionId
! 				 * above) in snapshot->xip - we just assume that all xacts
  				 * with such xid-s are running and may be ignored.
  				 */
  				continue;
  			}
--- 319,331 ----
  				xid < FirstTransactionId || xid >= snapshot->xmax)
  			{
  
! 				/*--------
! 				 * Seems that there is no sense to store
! 				 * 		xid >= snapshot->xmax
! 				 * (what we got from ReadNewTransactionId above)
! 				 * in snapshot->xip.  We just assume that all xacts
  				 * with such xid-s are running and may be ignored.
+ 				 *--------
  				 */
  				continue;
  			}
Index: src/backend/utils/adt/formatting.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt/formatting.c,v
retrieving revision 1.35
diff -c -r1.35 formatting.c
*** src/backend/utils/adt/formatting.c	2001/03/22 06:16:17	1.35
--- src/backend/utils/adt/formatting.c	2001/03/23 04:37:36
***************
*** 2846,2854 ****
  	else if (tmfc->yy)
  	{
  
! 		/*
! 		 * 2-digit year: '00' ... '69'	= 2000 ... 2069 '70' ... '99'  =
! 		 * 1970 ... 1999
  		 */
  		tm->tm_year = tmfc->yy;
  
--- 2846,2856 ----
  	else if (tmfc->yy)
  	{
  
! 		/*---------
! 		 * 2-digit year:
! 		 * '00' ... '69'  = 2000 ... 2069
! 		 * '70' ... '99'  = 1970 ... 1999
! 		 *---------
  		 */
  		tm->tm_year = tmfc->yy;
  
***************
*** 2860,2868 ****
  	else if (tmfc->yyy)
  	{
  
! 		/*
! 		 * 3-digit year: '100' ... '999' = 1100 ... 1999 '000' ... '099' =
! 		 * 2000 ... 2099
  		 */
  		tm->tm_year = tmfc->yyy;
  
--- 2862,2872 ----
  	else if (tmfc->yyy)
  	{
  
! 		/*---------
! 		 * 3-digit year:
! 		 *	'100' ... '999' = 1100 ... 1999
! 		 *	'000' ... '099' = 2000 ... 2099
! 		 *---------
  		 */
  		tm->tm_year = tmfc->yyy;
  
Index: src/backend/utils/adt/selfuncs.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v
retrieving revision 1.86
diff -c -r1.86 selfuncs.c
*** src/backend/utils/adt/selfuncs.c	2001/03/22 03:59:54	1.86
--- src/backend/utils/adt/selfuncs.c	2001/03/23 04:37:38
***************
*** 1642,1650 ****
  							   Int32GetDatum(SEL_CONSTANT | SEL_RIGHT)));
  	pfree(DatumGetPointer(prefixcon));
  
! 	/*
! 	 * If we can create a string larger than the prefix, say "x <
! 	 * greaterstr".
  	 */
  	greaterstr = make_greater_string(prefix, datatype);
  	if (greaterstr)
--- 1642,1651 ----
  							   Int32GetDatum(SEL_CONSTANT | SEL_RIGHT)));
  	pfree(DatumGetPointer(prefixcon));
  
! 	/*-------
! 	 * If we can create a string larger than the prefix, say
! 	 *	"x < greaterstr".
! 	 *-------
  	 */
  	greaterstr = make_greater_string(prefix, datatype);
  	if (greaterstr)
Index: src/backend/utils/cache/lsyscache.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v
retrieving revision 1.51
diff -c -r1.51 lsyscache.c
*** src/backend/utils/cache/lsyscache.c	2001/03/22 03:59:57	1.51
--- src/backend/utils/cache/lsyscache.c	2001/03/23 04:37:39
***************
*** 272,278 ****
  
  	/*
  	 * VACUUM ANALYZE has not been run for this table. Produce an estimate
! 	 * = 1/numtuples.  This may produce unreasonably small estimates for
  	 * large tables, so limit the estimate to no less than min_estimate.
  	 */
  	dispersion = 1.0 / (double) ntuples;
--- 272,278 ----
  
  	/*
  	 * VACUUM ANALYZE has not been run for this table. Produce an estimate
! 	 * of 1/numtuples.  This may produce unreasonably small estimates for
  	 * large tables, so limit the estimate to no less than min_estimate.
  	 */
  	dispersion = 1.0 / (double) ntuples;
Index: src/backend/utils/cache/relcache.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/cache/relcache.c,v
retrieving revision 1.129
diff -c -r1.129 relcache.c
*** src/backend/utils/cache/relcache.c	2001/03/22 03:59:57	1.129
--- src/backend/utils/cache/relcache.c	2001/03/23 04:37:40
***************
*** 2833,2843 ****
  	 * the descriptors, nail them into cache so we never lose them.
  	 */
  
! 	/*
! 	 * Removed the following ProcessingMode change -- inoue At this point
! 	 * 1) Catalog Cache isn't initialized 2) Relation Cache for the
! 	 * following critical indexes aren't built oldmode =
! 	 * GetProcessingMode(); SetProcessingMode(BootstrapProcessing);
  	 */
  
  	bi.infotype = INFO_RELNAME;
--- 2833,2846 ----
  	 * the descriptors, nail them into cache so we never lose them.
  	 */
  
! 	/*---------
! 	 * Removed the following ProcessingMode change -- inoue
! 	 * At this point
! 	 * 1) Catalog Cache isn't initialized
! 	 * 2) Relation Cache for the following critical indexes aren't built
! 	 * oldmode = GetProcessingMode();
! 	 * SetProcessingMode(BootstrapProcessing);
! 	 *---------
  	 */
  
  	bi.infotype = INFO_RELNAME;
Index: src/backend/utils/sort/tuplesort.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v
retrieving revision 1.14
diff -c -r1.14 tuplesort.c
*** src/backend/utils/sort/tuplesort.c	2001/03/22 04:00:09	1.14
--- src/backend/utils/sort/tuplesort.c	2001/03/23 04:37:42
***************
*** 129,136 ****
  	 * kind of tuple we are sorting from the routines that don't need to
  	 * know it. They are set up by the tuplesort_begin_xxx routines.
  	 *
! 	 * Function to compare two tuples; result is per qsort() convention, ie,
! 	 * <0, 0, >0 according as a<b, a=b, a>b.
  	 */
  	int			(*comparetup) (Tuplesortstate *state, const void *a, const void *b);
  
--- 129,138 ----
  	 * kind of tuple we are sorting from the routines that don't need to
  	 * know it. They are set up by the tuplesort_begin_xxx routines.
  	 *
! 	 * Function to compare two tuples; result is per qsort() convention,
! 	 * ie:
! 	 *
! 	 * 	<0, 0, >0 according as a<b, a=b, a>b.
  	 */
  	int			(*comparetup) (Tuplesortstate *state, const void *a, const void *b);
  
Index: src/bin/pg_dump/pg_backup_db.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v
retrieving revision 1.16
diff -c -r1.16 pg_backup_db.c
*** src/bin/pg_dump/pg_backup_db.c	2001/03/22 04:00:12	1.16
--- src/bin/pg_dump/pg_backup_db.c	2001/03/23 04:37:42
***************
*** 473,481 ****
  				qry += loc + 1;
  				isEnd = (strcmp(AH->pgCopyBuf->data, "\\.\n") == 0);
  
! 				/*
! 				 * fprintf(stderr, "Sending '%s' via COPY (at end =
! 				 * %d)\n\n", AH->pgCopyBuf->data, isEnd);
  				 */
  
  				if (PQputline(AH->connection, AH->pgCopyBuf->data) != 0)
--- 473,482 ----
  				qry += loc + 1;
  				isEnd = (strcmp(AH->pgCopyBuf->data, "\\.\n") == 0);
  
! 				/*---------
! 				 * fprintf(stderr, "Sending '%s' via
! 				 *		COPY (at end = %d)\n\n", AH->pgCopyBuf->data, isEnd);
! 				 *---------
  				 */
  
  				if (PQputline(AH->connection, AH->pgCopyBuf->data) != 0)
Index: src/bin/pg_dump/pg_dump.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.196
diff -c -r1.196 pg_dump.c
*** src/bin/pg_dump/pg_dump.c	2001/03/22 04:00:14	1.196
--- src/bin/pg_dump/pg_dump.c	2001/03/23 04:37:45
***************
*** 4405,4412 ****
  	/*
  	 * The logic we use for restoring sequences is as follows: -   Add a
  	 * basic CREATE SEQUENCE statement (use last_val for start if called
! 	 * == 'f', else use min_val for start_val). -	Add a 'SETVAL(seq,
! 	 * last_val, iscalled)' at restore-time iff we load data
  	 */
  
  	if (!dataOnly)
--- 4405,4414 ----
  	/*
  	 * The logic we use for restoring sequences is as follows: -   Add a
  	 * basic CREATE SEQUENCE statement (use last_val for start if called
! 	 * with 'f', else use min_val for start_val).
! 	 *
! 	 *	Add a 'SETVAL(seq, last_val, iscalled)' at restore-time iff
! 	 *  we load data
  	 */
  
  	if (!dataOnly)
Index: src/bin/pg_dump/pg_dump.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_dump.h,v
retrieving revision 1.59
diff -c -r1.59 pg_dump.h
*** src/bin/pg_dump/pg_dump.h	2001/03/22 04:00:15	1.59
--- src/bin/pg_dump/pg_dump.h	2001/03/23 04:37:45
***************
*** 158,165 ****
  {
  	char	   *oid;
  	char	   *oprname;
! 	char	   *oprkind;		/* "b" = binary, "l" = left unary, "r" =
! 								 * right unary */
  	char	   *oprcode;		/* operator function name */
  	char	   *oprleft;		/* left operand type */
  	char	   *oprright;		/* right operand type */
--- 158,169 ----
  {
  	char	   *oid;
  	char	   *oprname;
! 	char	   *oprkind;		/*----------
! 								 * 	b = binary,
! 								 *	l = left unary
! 								 *	r = right unary
! 								 *----------
! 								 */
  	char	   *oprcode;		/* operator function name */
  	char	   *oprleft;		/* left operand type */
  	char	   *oprright;		/* right operand type */
Index: src/include/catalog/pg_type.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/catalog/pg_type.h,v
retrieving revision 1.102
diff -c -r1.102 pg_type.h
*** src/include/catalog/pg_type.h	2001/03/22 04:00:41	1.102
--- src/include/catalog/pg_type.h	2001/03/23 04:37:46
***************
*** 77,84 ****
  	 * be a "real" array type; some ordinary fixed-length types can also
  	 * be subscripted (e.g., oidvector). Variable-length types can *not*
  	 * be turned into pseudo-arrays like that. Hence, the way to determine
! 	 * whether a type is a "true" array type is typelem != 0 and typlen <
! 	 * 0.
  	 */
  	Oid			typelem;
  	regproc		typinput;
--- 77,85 ----
  	 * be a "real" array type; some ordinary fixed-length types can also
  	 * be subscripted (e.g., oidvector). Variable-length types can *not*
  	 * be turned into pseudo-arrays like that. Hence, the way to determine
! 	 * whether a type is a "true" array type is if:
! 	 *
! 	 *	typelem != 0 and typlen < 0.
  	 */
  	Oid			typelem;
  	regproc		typinput;
Index: src/include/nodes/parsenodes.h
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/nodes/parsenodes.h,v
retrieving revision 1.125
diff -c -r1.125 parsenodes.h
*** src/include/nodes/parsenodes.h	2001/03/22 04:00:51	1.125
--- src/include/nodes/parsenodes.h	2001/03/23 04:37:47
***************
*** 116,125 ****
  typedef struct AlterTableStmt
  {
  	NodeTag		type;
! 	char		subtype;		/* A = add column, T = alter column, D =
! 								 * drop column, C = add constraint, X =
! 								 * drop constraint, E = add toast table, U
! 								 * = change owner */
  	char	   *relname;		/* table to work on */
  	InhOption	inhOpt;			/* recursively act on children? */
  	char	   *name;			/* column or constraint name to act on, or
--- 116,131 ----
  typedef struct AlterTableStmt
  {
  	NodeTag		type;
! 	char		subtype;		/*------------
! 								 * 	A = add column
! 								 *	T = alter column
! 								 *	D = drop column
! 								 *	C = add constraint
! 								 *	X = drop constraint
! 								 *	E = add toast table,
! 								 *	U = change owner
! 								 *------------
! 								 */
  	char	   *relname;		/* table to work on */
  	InhOption	inhOpt;			/* recursively act on children? */
  	char	   *name;			/* column or constraint name to act on, or
Index: src/interfaces/ecpg/lib/connect.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/ecpg/lib/connect.c,v
retrieving revision 1.8
diff -c -r1.8 connect.c
*** src/interfaces/ecpg/lib/connect.c	2001/03/22 04:01:17	1.8
--- src/interfaces/ecpg/lib/connect.c	2001/03/23 04:37:47
***************
*** 307,316 ****
  		if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0)
  		{
  
! 			/*
  			 * new style:
! 			 * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db
! 			 * name][?options]
  			 */
  			offset += strlen("postgresql://");
  
--- 307,317 ----
  		if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0)
  		{
  
! 			/*------
  			 * new style:
! 			 * 	<tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
! 			 *	[/db name][?options]
! 			 *------
  			 */
  			offset += strlen("postgresql://");
  
Index: src/interfaces/libpq/fe-connect.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v
retrieving revision 1.162
diff -c -r1.162 fe-connect.c
*** src/interfaces/libpq/fe-connect.c	2001/03/22 06:16:20	1.162
--- src/interfaces/libpq/fe-connect.c	2001/03/23 04:37:48
***************
*** 582,591 ****
  		if (strncmp(conn->dbName + offset, "postgresql://", strlen("postgresql://")) == 0)
  		{
  
! 			/*
  			 * new style:
! 			 * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db
! 			 * name][?options]
  			 */
  			offset += strlen("postgresql://");
  
--- 582,592 ----
  		if (strncmp(conn->dbName + offset, "postgresql://", strlen("postgresql://")) == 0)
  		{
  
! 			/*-------
  			 * new style:
! 			 * 	<tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
! 			 *	[/db name][?options]
! 			 *-------
  			 */
  			offset += strlen("postgresql://");
  
Index: src/interfaces/odbc/info.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/info.c,v
retrieving revision 1.42
diff -c -r1.42 info.c
*** src/interfaces/odbc/info.c	2001/03/22 04:01:33	1.42
--- src/interfaces/odbc/info.c	2001/03/23 04:37:50
***************
*** 1738,1754 ****
  		set_tuplefield_string(&row->tuple[5], field_type_name);
  
  
! 		/*
  		 * Some Notes about Postgres Data Types:
  		 *
  		 * VARCHAR - the length is stored in the pg_attribute.atttypmod field
  		 * BPCHAR  - the length is also stored as varchar is
  		 *
! 		 * NUMERIC - the scale is stored in atttypmod as follows: precision =
! 		 * ((atttypmod - VARHDRSZ) >> 16) & 0xffff scale	 = (atttypmod
! 		 * - VARHDRSZ) & 0xffff
  		 *
  		 *
  		 */
  		qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n",
  			 table_name, field_name, field_type, pgtype_to_sqltype, field_type_name);
--- 1738,1755 ----
  		set_tuplefield_string(&row->tuple[5], field_type_name);
  
  
! 		/*----------
  		 * Some Notes about Postgres Data Types:
  		 *
  		 * VARCHAR - the length is stored in the pg_attribute.atttypmod field
  		 * BPCHAR  - the length is also stored as varchar is
  		 *
! 		 * NUMERIC - the scale is stored in atttypmod as follows:
  		 *
+ 		 *	precision =((atttypmod - VARHDRSZ) >> 16) & 0xffff
+ 		 *	scale	 = (atttypmod - VARHDRSZ) & 0xffff
  		 *
+ 		 *----------
  		 */
  		qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n",
  			 table_name, field_name, field_type, pgtype_to_sqltype, field_type_name);
Index: src/interfaces/odbc/options.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/odbc/options.c,v
retrieving revision 1.25
diff -c -r1.25 options.c
*** src/interfaces/odbc/options.c	2001/03/22 04:01:34	1.25
--- src/interfaces/odbc/options.c	2001/03/23 04:37:50
***************
*** 81,96 ****
  				stmt->options.scroll_concurrency = vParam;
  			break;
  
! 			/*
! 			 * if (globals.lie) { if (conn)
! 			 * conn->stmtOptions.scroll_concurrency = vParam; if (stmt)
! 			 * stmt->options.scroll_concurrency = vParam; } else {
  			 *
! 			 * if (conn) conn->stmtOptions.scroll_concurrency =
! 			 * SQL_CONCUR_READ_ONLY; if (stmt)
! 			 * stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY;
! 			 *
! 			 * if (vParam != SQL_CONCUR_READ_ONLY) changed = TRUE; } break;
  			 */
  
  		case SQL_CURSOR_TYPE:
--- 81,107 ----
  				stmt->options.scroll_concurrency = vParam;
  			break;
  
! 			/*----------
! 			 * if (globals.lie)
! 			 * {
! 			 *		if (conn)
! 			 * 			conn->stmtOptions.scroll_concurrency = vParam;
! 			 *		if (stmt)
! 			 * 			stmt->options.scroll_concurrency = vParam;
! 			 *		} else {
! 			 * 			if (conn)
! 			 *				conn->stmtOptions.scroll_concurrency =
! 			 * 					SQL_CONCUR_READ_ONLY;
! 			 *			if (stmt)
! 			 * 				stmt->options.scroll_concurrency =
! 			 *					SQL_CONCUR_READ_ONLY;
  			 *
! 			 * 			if (vParam != SQL_CONCUR_READ_ONLY)
! 			 *				changed = TRUE;
! 			 *		}
! 			 *		break;
! 			 *	}
! 			 *----------
  			 */
  
  		case SQL_CURSOR_TYPE:
