Index: src/backend/commands/copy.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/commands/copy.c,v
retrieving revision 1.156
diff -c -r1.156 copy.c
*** src/backend/commands/copy.c	21 May 2002 22:59:00 -0000	1.156
--- src/backend/commands/copy.c	27 May 2002 23:05:55 -0000
***************
*** 46,58 ****
  
  
  /* non-export function prototypes */
! static void CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim, char *null_print);
! static void CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim, char *null_print);
  static Oid	GetInputFunction(Oid type);
  static Oid	GetTypeElement(Oid type);
  static void CopyReadNewline(FILE *fp, int *newline);
! static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_print);
! static void CopyAttributeOut(FILE *fp, char *string, char *delim);
  
  static const char BinarySignature[12] = "PGBCOPY\n\377\r\n\0";
  
--- 46,58 ----
  
  
  /* non-export function prototypes */
! static void CopyTo(Relation rel, bool binary, bool oids, FILE *fp, const char *delim, const char *null_print);
! static void CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, const char *delim, const char *null_print);
  static Oid	GetInputFunction(Oid type);
  static Oid	GetTypeElement(Oid type);
  static void CopyReadNewline(FILE *fp, int *newline);
! static char *CopyReadAttribute(FILE *fp, bool *isnull, const char *delim, int *newline, const char *null_print);
! static void CopyAttributeOut(FILE *fp, char *server_string, const char *delim);
  
  static const char BinarySignature[12] = "PGBCOPY\n\377\r\n\0";
  
***************
*** 262,268 ****
   */
  void
  DoCopy(const RangeVar *relation, bool binary, bool oids, bool from, bool pipe,
! 	   char *filename, char *delim, char *null_print)
  {
  	FILE	   *fp;
  	Relation	rel;
--- 262,268 ----
   */
  void
  DoCopy(const RangeVar *relation, bool binary, bool oids, bool from, bool pipe,
! 	   const char *filename, const char *delim, const char *null_print)
  {
  	FILE	   *fp;
  	Relation	rel;
***************
*** 434,440 ****
   */
  static void
  CopyTo(Relation rel, bool binary, bool oids, FILE *fp,
! 	   char *delim, char *null_print)
  {
  	HeapTuple	tuple;
  	TupleDesc	tupDesc;
--- 434,440 ----
   */
  static void
  CopyTo(Relation rel, bool binary, bool oids, FILE *fp,
! 	   const char *delim, const char *null_print)
  {
  	HeapTuple	tuple;
  	TupleDesc	tupDesc;
***************
*** 645,655 ****
  
  
  /*
!  * Copy FROM file to relation.
   */
  static void
  CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
! 		 char *delim, char *null_print)
  {
  	HeapTuple	tuple;
  	TupleDesc	tupDesc;
--- 645,655 ----
  
  
  /*
!  * Copy FROM file or stdin to relation.
   */
  static void
  CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
! 		 const char *delim, const char *null_print)
  {
  	HeapTuple	tuple;
  	TupleDesc	tupDesc;
***************
*** 660,671 ****
  	int			i;
  	Oid			in_func_oid;
  	Datum	   *values;
  	char	   *nulls;
  	bool		isnull;
  	int			done = 0;
  	char	   *string;
  	ResultRelInfo *resultRelInfo;
! 	EState	   *estate = CreateExecutorState(); /* for ExecConstraints() */
  	TupleTable	tupleTable;
  	TupleTableSlot *slot;
  	Oid			loaded_oid = InvalidOid;
--- 660,674 ----
  	int			i;
  	Oid			in_func_oid;
  	Datum	   *values;
+ 	Node	  **defaults;
  	char	   *nulls;
  	bool		isnull;
  	int			done = 0;
  	char	   *string;
  	ResultRelInfo *resultRelInfo;
! 	/* for checking constraints and evaluating default values */
! 	EState	   *estate = CreateExecutorState();
! 	ExprContext *econtext = GetPerTupleExprContext(estate);
  	TupleTable	tupleTable;
  	TupleTableSlot *slot;
  	Oid			loaded_oid = InvalidOid;
***************
*** 717,729 ****
  
  		/* Signature */
  		CopyGetData(readSig, 12, fp);
! 		if (CopyGetEof(fp) ||
! 			memcmp(readSig, BinarySignature, 12) != 0)
  			elog(ERROR, "COPY BINARY: file signature not recognized");
  		/* Integer layout field */
  		CopyGetData(&tmp, sizeof(int32), fp);
! 		if (CopyGetEof(fp) ||
! 			tmp != 0x01020304)
  			elog(ERROR, "COPY BINARY: incompatible integer layout");
  		/* Flags field */
  		CopyGetData(&tmp, sizeof(int32), fp);
--- 720,730 ----
  
  		/* Signature */
  		CopyGetData(readSig, 12, fp);
! 		if (CopyGetEof(fp) || memcmp(readSig, BinarySignature, 12) != 0)
  			elog(ERROR, "COPY BINARY: file signature not recognized");
  		/* Integer layout field */
  		CopyGetData(&tmp, sizeof(int32), fp);
! 		if (CopyGetEof(fp) || tmp != 0x01020304)
  			elog(ERROR, "COPY BINARY: incompatible integer layout");
  		/* Flags field */
  		CopyGetData(&tmp, sizeof(int32), fp);
***************
*** 735,742 ****
  			elog(ERROR, "COPY BINARY: unrecognized critical flags in header");
  		/* Header extension length */
  		CopyGetData(&tmp, sizeof(int32), fp);
! 		if (CopyGetEof(fp) ||
! 			tmp < 0)
  			elog(ERROR, "COPY BINARY: bogus file header (missing length)");
  		/* Skip extension header, if present */
  		while (tmp-- > 0)
--- 736,742 ----
  			elog(ERROR, "COPY BINARY: unrecognized critical flags in header");
  		/* Header extension length */
  		CopyGetData(&tmp, sizeof(int32), fp);
! 		if (CopyGetEof(fp) || tmp < 0)
  			elog(ERROR, "COPY BINARY: bogus file header (missing length)");
  		/* Skip extension header, if present */
  		while (tmp-- > 0)
***************
*** 757,762 ****
--- 757,767 ----
  	values = (Datum *) palloc(attr_count * sizeof(Datum));
  	nulls = (char *) palloc(attr_count * sizeof(char));
  
+ 	/* Setup default values */
+ 	defaults = (Node **) palloc(attr_count * sizeof(Node *));
+ 	for (i = 0; i < attr_count; i++)
+ 		defaults[i] = ExecBuildColumnDefault(rel, i + 1);
+ 
  	copy_lineno = 0;
  	fe_eof = false;
  
***************
*** 769,777 ****
  		/* Reset the per-output-tuple exprcontext */
  		ResetPerTupleExprContext(estate);
  
! 		/* Initialize all values for row to NULL */
  		MemSet(values, 0, attr_count * sizeof(Datum));
- 		MemSet(nulls, 'n', attr_count * sizeof(char));
  
  		if (!binary)
  		{
--- 774,791 ----
  		/* Reset the per-output-tuple exprcontext */
  		ResetPerTupleExprContext(estate);
  
! 		/*
! 		 * We keep track of NULL values using this somewhat hokey
! 		 * array, as required by heap_formtuple(). Arbitrarily, a
! 		 * 'd' indicates the default value, a 'n' indicates that
! 		 * the attribute is NULL, and a ' ' (space) indicates that
! 		 * the attribute is non-NULL. By the time this array
! 		 * reaches heap_formtuple(), the 'd' values should all
! 		 * have been replaced by a ' ' when the default value for
! 		 * the column is evaluated.
! 		 */
! 		MemSet(nulls, 'd', attr_count * sizeof(char));
  		MemSet(values, 0, attr_count * sizeof(Datum));
  
  		if (!binary)
  		{
***************
*** 799,807 ****
  				string = CopyReadAttribute(fp, &isnull, delim,
  										   &newline, null_print);
  				if (isnull)
! 				{
! 					/* already set values[i] and nulls[i] */
! 				}
  				else if (string == NULL)
  					done = 1;	/* end of file */
  				else
--- 813,819 ----
  				string = CopyReadAttribute(fp, &isnull, delim,
  										   &newline, null_print);
  				if (isnull)
! 					nulls[i] = 'n';
  				else if (string == NULL)
  					done = 1;	/* end of file */
  				else
***************
*** 812,817 ****
--- 824,838 ----
  									  Int32GetDatum(attr[i]->atttypmod));
  					nulls[i] = ' ';
  				}
+ 
+ 				/*
+ 				 * If we saw a newline (i.e. ran out of elements before the
+ 				 * 'for' loop exited), we must have some missing elements.
+ 				 * These will be set to the default value later. This is
+ 				 * hackish due to CopyReadAttribute().
+ 				 */
+ 				if (newline)
+ 					break;
  			}
  			if (!done)
  				CopyReadNewline(fp, &newline);
***************
*** 822,829 ****
  						fld_size;
  
  			CopyGetData(&fld_count, sizeof(int16), fp);
! 			if (CopyGetEof(fp) ||
! 				fld_count == -1)
  				done = 1;
  			else
  			{
--- 843,849 ----
  						fld_size;
  
  			CopyGetData(&fld_count, sizeof(int16), fp);
! 			if (CopyGetEof(fp) || fld_count == -1)
  				done = 1;
  			else
  			{
***************
*** 913,918 ****
--- 933,969 ----
  		if (done)
  			break;
  
+ 		/*
+ 		 * Set default values on the actual data. We apply the default if:
+ 		 *	(a) the null indicator is 'd' (i.e. not explicitely NULL).
+ 		 *	(b) there is no value stored for the attribute in values
+ 		 */
+ 		for (i = 0; i < attr_count; i++)
+ 		{
+ 			if (nulls[i] == 'd' && values[i] == 0)
+ 			{
+ 				/* If the default value is NULL, we're done */
+ 				if (defaults[i] == NULL)
+ 					nulls[i] = 'n';
+ 				else
+ 				{
+ 					bool isNull;
+ 
+ 					values[i] = ExecEvalExprSwitchContext(defaults[i], econtext,
+ 														  &isNull, NULL);
+ 
+ 					/* If it's NULL, return value is meaningless */
+ 					if (isNull)
+ 					{
+ 						values[i] = 0;
+ 						nulls[i] = 'n';
+ 					}
+ 					else
+ 						nulls[i] = ' ';
+ 				}
+ 			}
+ 		}
+ 
  		tuple = heap_formtuple(tupDesc, values, nulls);
  
  		if (oids && file_has_oids)
***************
*** 974,979 ****
--- 1025,1035 ----
  	 */
  	copy_lineno = 0;
  
+ 	/*
+ 	 * Don't bother pfree'ing the contents of defaults, the memory
+ 	 * context which it is in is about to get reset anyway.
+ 	 */
+ 	pfree(defaults);
  	pfree(values);
  	pfree(nulls);
  
***************
*** 1047,1056 ****
   * delim is the column delimiter string (currently always 1 character).
   * *newline remembers whether we've seen a newline ending this tuple.
   * null_print says how NULL values are represented
   */
  
  static char *
! CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_print)
  {
  	int			c;
  	int			delimc = (unsigned char)delim[0];
--- 1103,1118 ----
   * delim is the column delimiter string (currently always 1 character).
   * *newline remembers whether we've seen a newline ending this tuple.
   * null_print says how NULL values are represented
+  *
+  * Note that there is a difference between a NULL return value
+  * (which indicates EOF or missing data for an attribute),
+  * and setting *isnull to true (which indicates that the
+  * equivalent of an SQL NULL value was found, so NULL should
+  * be inserted).
   */
  
  static char *
! CopyReadAttribute(FILE *fp, bool *isnull, const char *delim, int *newline, const char *null_print)
  {
  	int			c;
  	int			delimc = (unsigned char)delim[0];
***************
*** 1071,1081 ****
  	/* if last delimiter was a newline return a NULL attribute */
  	if (*newline)
  	{
! 		*isnull = (bool) true;
  		return NULL;
  	}
  
! 	*isnull = (bool) false;		/* set default */
  
  	for (;;)
  	{
--- 1133,1143 ----
  	/* if last delimiter was a newline return a NULL attribute */
  	if (*newline)
  	{
! 		*isnull = true;
  		return NULL;
  	}
  
! 	*isnull = false;		/* set default */
  
  	for (;;)
  	{
***************
*** 1215,1221 ****
  }
  
  static void
! CopyAttributeOut(FILE *fp, char *server_string, char *delim)
  {
  	char	   *string;
  	char		c;
--- 1277,1283 ----
  }
  
  static void
! CopyAttributeOut(FILE *fp, char *server_string, const char *delim)
  {
  	char	   *string;
  	char		c;
Index: src/backend/executor/execUtils.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/executor/execUtils.c,v
retrieving revision 1.82
diff -c -r1.82 execUtils.c
*** src/backend/executor/execUtils.c	24 May 2002 18:57:56 -0000	1.82
--- src/backend/executor/execUtils.c	27 May 2002 23:05:56 -0000
***************
*** 39,46 ****
--- 39,50 ----
  #include "catalog/pg_index.h"
  #include "executor/execdebug.h"
  #include "miscadmin.h"
+ #include "parser/parse_coerce.h"
+ #include "parser/parse_expr.h"
+ #include "parser/parse_target.h"
  #include "utils/builtins.h"
  #include "utils/fmgroids.h"
+ #include "utils/lsyscache.h"
  #include "utils/memutils.h"
  #include "utils/relcache.h"
  #include "utils/syscache.h"
***************
*** 123,128 ****
--- 127,227 ----
  	fprintf(statfp, "\n");
  }
  #endif
+ 
+ /*
+  * Make an expression tree for the default value for a column.
+  *
+  * If there is no default, return a NULL instead.
+  */
+ Node *
+ ExecBuildColumnDefault(Relation rel, int attrno)
+ {
+ 	TupleDesc	rd_att = rel->rd_att;
+ 	Form_pg_attribute att_tup = rd_att->attrs[attrno - 1];
+ 	Oid			atttype = att_tup->atttypid;
+ 	int32		atttypmod = att_tup->atttypmod;
+ 	Node	   *expr = NULL;
+ 	Oid			exprtype;
+ 
+ 	/*
+ 	 * Scan to see if relation has a default for this column.
+ 	 */
+ 	if (rd_att->constr && rd_att->constr->num_defval > 0)
+ 	{
+ 		AttrDefault *defval = rd_att->constr->defval;
+ 		int			ndef = rd_att->constr->num_defval;
+ 
+ 		while (--ndef >= 0)
+ 		{
+ 			if (attrno == defval[ndef].adnum)
+ 			{
+ 				/*
+ 				 * Found it, convert string representation to node tree.
+ 				 */
+ 				expr = stringToNode(defval[ndef].adbin);
+ 				break;
+ 			}
+ 		}
+ 	}
+ 
+ 	if (expr == NULL)
+ 	{
+ 		/*
+ 		 * No per-column default, so look for a default for the type itself.
+ 		 */
+ 		if (att_tup->attisset)
+ 		{
+ 			/*
+ 			 * Set attributes are represented as OIDs no matter what the set
+ 			 * element type is, and the element type's default is irrelevant
+ 			 * too.
+ 			 */
+ 		}
+ 		else
+ 		{
+ 			expr = get_typdefault(atttype);
+ 		}
+ 	}
+ 
+ 	if (expr == NULL)
+ 		return NULL;			/* No default anywhere */
+ 
+ 	/*
+ 	 * Make sure the value is coerced to the target column
+ 	 * type (might not be right type yet if it's not a
+ 	 * constant!)  This should match the parser's processing of
+ 	 * non-defaulted expressions --- see
+ 	 * updateTargetListEntry().
+ 	 */
+ 	exprtype = exprType(expr);
+ 
+ 	if (exprtype != atttype)
+ 	{
+ 		expr = CoerceTargetExpr(NULL, expr, exprtype,
+ 								atttype, atttypmod, false);
+ 
+ 		/*
+ 		 * This really shouldn't fail; should have checked the
+ 		 * default's type when it was created ...
+ 		 */
+ 		if (expr == NULL)
+ 			elog(ERROR, "Column \"%s\" is of type %s"
+ 				 " but default expression is of type %s"
+ 				 "\n\tYou will need to rewrite or cast the expression",
+ 				 NameStr(att_tup->attname),
+ 				 format_type_be(atttype),
+ 				 format_type_be(exprtype));
+ 	}
+ 
+ 	/*
+ 	 * If the column is a fixed-length type, it may need a
+ 	 * length coercion as well as a type coercion.
+ 	 */
+ 	expr = coerce_type_typmod(NULL, expr, atttype, atttypmod);
+ 
+ 	return expr;
+ }
+ 
  
  /* ----------------------------------------------------------------
   *				 miscellaneous node-init support functions
Index: src/backend/rewrite/rewriteHandler.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/rewrite/rewriteHandler.c,v
retrieving revision 1.102
diff -c -r1.102 rewriteHandler.c
*** src/backend/rewrite/rewriteHandler.c	11 Apr 2002 20:00:02 -0000	1.102
--- src/backend/rewrite/rewriteHandler.c	27 May 2002 23:05:58 -0000
***************
*** 16,37 ****
  #include "access/heapam.h"
  #include "catalog/pg_operator.h"
  #include "catalog/pg_type.h"
  #include "miscadmin.h"
  #include "nodes/makefuncs.h"
  #include "optimizer/clauses.h"
  #include "optimizer/prep.h"
  #include "optimizer/var.h"
  #include "parser/analyze.h"
- #include "parser/parse_coerce.h"
- #include "parser/parse_expr.h"
  #include "parser/parse_oper.h"
- #include "parser/parse_target.h"
  #include "parser/parse_type.h"
  #include "parser/parsetree.h"
  #include "rewrite/rewriteHandler.h"
  #include "rewrite/rewriteManip.h"
  #include "utils/builtins.h"
- #include "utils/lsyscache.h"
  
  
  static Query *rewriteRuleAction(Query *parsetree,
--- 16,34 ----
  #include "access/heapam.h"
  #include "catalog/pg_operator.h"
  #include "catalog/pg_type.h"
+ #include "executor/executor.h"
  #include "miscadmin.h"
  #include "nodes/makefuncs.h"
  #include "optimizer/clauses.h"
  #include "optimizer/prep.h"
  #include "optimizer/var.h"
  #include "parser/analyze.h"
  #include "parser/parse_oper.h"
  #include "parser/parse_type.h"
  #include "parser/parsetree.h"
  #include "rewrite/rewriteHandler.h"
  #include "rewrite/rewriteManip.h"
  #include "utils/builtins.h"
  
  
  static Query *rewriteRuleAction(Query *parsetree,
***************
*** 43,49 ****
  static void rewriteTargetList(Query *parsetree, Relation target_relation);
  static TargetEntry *process_matched_tle(TargetEntry *src_tle,
  										TargetEntry *prior_tle);
- static Node *build_column_default(Relation rel, int attrno);
  static void markQueryForUpdate(Query *qry, bool skipOldNew);
  static List *matchLocks(CmdType event, RuleLock *rulelocks,
  		   int varno, Query *parsetree);
--- 40,45 ----
***************
*** 294,300 ****
  			 */
  			Node	   *new_expr;
  
! 			new_expr = build_column_default(target_relation, attrno);
  
  			if (new_expr)
  				new_tle = makeTargetEntry(makeResdom(attrno,
--- 290,296 ----
  			 */
  			Node	   *new_expr;
  
! 			new_expr = ExecBuildColumnDefault(target_relation, attrno);
  
  			if (new_expr)
  				new_tle = makeTargetEntry(makeResdom(attrno,
***************
*** 404,505 ****
  
  	return makeTargetEntry(resdom, (Node *) newexpr);
  }
- 
- 
- /*
-  * Make an expression tree for the default value for a column.
-  *
-  * If there is no default, return a NULL instead.
-  */
- static Node *
- build_column_default(Relation rel, int attrno)
- {
- 	TupleDesc	rd_att = rel->rd_att;
- 	Form_pg_attribute att_tup = rd_att->attrs[attrno - 1];
- 	Oid			atttype = att_tup->atttypid;
- 	int32		atttypmod = att_tup->atttypmod;
- 	Node	   *expr = NULL;
- 	Oid			exprtype;
- 
- 	/*
- 	 * Scan to see if relation has a default for this column.
- 	 */
- 	if (rd_att->constr && rd_att->constr->num_defval > 0)
- 	{
- 		AttrDefault *defval = rd_att->constr->defval;
- 		int			ndef = rd_att->constr->num_defval;
- 
- 		while (--ndef >= 0)
- 		{
- 			if (attrno == defval[ndef].adnum)
- 			{
- 				/*
- 				 * Found it, convert string representation to node tree.
- 				 */
- 				expr = stringToNode(defval[ndef].adbin);
- 				break;
- 			}
- 		}
- 	}
- 
- 	if (expr == NULL)
- 	{
- 		/*
- 		 * No per-column default, so look for a default for the type itself.
- 		 */
- 		if (att_tup->attisset)
- 		{
- 			/*
- 			 * Set attributes are represented as OIDs no matter what the set
- 			 * element type is, and the element type's default is irrelevant
- 			 * too.
- 			 */
- 		}
- 		else
- 		{
- 			expr = get_typdefault(atttype);
- 		}
- 	}
- 
- 	if (expr == NULL)
- 		return NULL;			/* No default anywhere */
- 
- 	/*
- 	 * Make sure the value is coerced to the target column
- 	 * type (might not be right type yet if it's not a
- 	 * constant!)  This should match the parser's processing of
- 	 * non-defaulted expressions --- see
- 	 * updateTargetListEntry().
- 	 */
- 	exprtype = exprType(expr);
- 
- 	if (exprtype != atttype)
- 	{
- 		expr = CoerceTargetExpr(NULL, expr, exprtype,
- 								atttype, atttypmod, false);
- 
- 		/*
- 		 * This really shouldn't fail; should have checked the
- 		 * default's type when it was created ...
- 		 */
- 		if (expr == NULL)
- 			elog(ERROR, "Column \"%s\" is of type %s"
- 				 " but default expression is of type %s"
- 				 "\n\tYou will need to rewrite or cast the expression",
- 				 NameStr(att_tup->attname),
- 				 format_type_be(atttype),
- 				 format_type_be(exprtype));
- 	}
- 
- 	/*
- 	 * If the column is a fixed-length type, it may need a
- 	 * length coercion as well as a type coercion.
- 	 */
- 	expr = coerce_type_typmod(NULL, expr, atttype, atttypmod);
- 
- 	return expr;
- }
- 
  
  /*
   * matchLocks -
--- 400,405 ----
Index: src/backend/storage/file/fd.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/storage/file/fd.c,v
retrieving revision 1.91
diff -c -r1.91 fd.c
*** src/backend/storage/file/fd.c	5 May 2002 00:03:28 -0000	1.91
--- src/backend/storage/file/fd.c	27 May 2002 23:05:58 -0000
***************
*** 1144,1150 ****
   */
  
  FILE *
! AllocateFile(char *name, char *mode)
  {
  	FILE	   *file;
  
--- 1144,1150 ----
   */
  
  FILE *
! AllocateFile(const char *name, const char *mode)
  {
  	FILE	   *file;
  
Index: src/include/commands/copy.h
===================================================================
RCS file: /var/lib/cvs/pgsql/src/include/commands/copy.h,v
retrieving revision 1.17
diff -c -r1.17 copy.h
*** src/include/commands/copy.h	29 Mar 2002 19:06:21 -0000	1.17
--- src/include/commands/copy.h	27 May 2002 23:05:58 -0000
***************
*** 19,25 ****
  extern int	copy_lineno;
  
  void DoCopy(const RangeVar *relation, bool binary, bool oids,
! 			bool from, bool pipe,
! 			char *filename, char *delim, char *null_print);
  
  #endif   /* COPY_H */
--- 19,25 ----
  extern int	copy_lineno;
  
  void DoCopy(const RangeVar *relation, bool binary, bool oids,
! 			bool from, bool pipe, const char *filename,
! 			const char *delim, const char *null_print);
  
  #endif   /* COPY_H */
Index: src/include/executor/executor.h
===================================================================
RCS file: /var/lib/cvs/pgsql/src/include/executor/executor.h,v
retrieving revision 1.65
diff -c -r1.65 executor.h
*** src/include/executor/executor.h	24 May 2002 18:57:57 -0000	1.65
--- src/include/executor/executor.h	27 May 2002 23:05:58 -0000
***************
*** 140,146 ****
  				   TupleDesc tupDesc, bool shouldFree);
  extern void ExecAssignScanTypeFromOuterPlan(Plan *node,
  								CommonScanState *csstate);
! extern Form_pg_attribute ExecGetTypeInfo(Relation relDesc);
  
  extern ExprContext *MakeExprContext(TupleTableSlot *slot,
  				MemoryContext queryContext);
--- 140,146 ----
  				   TupleDesc tupDesc, bool shouldFree);
  extern void ExecAssignScanTypeFromOuterPlan(Plan *node,
  								CommonScanState *csstate);
! extern Node *ExecBuildColumnDefault(Relation rel, int attrno);
  
  extern ExprContext *MakeExprContext(TupleTableSlot *slot,
  				MemoryContext queryContext);
Index: src/include/storage/fd.h
===================================================================
RCS file: /var/lib/cvs/pgsql/src/include/storage/fd.h,v
retrieving revision 1.34
diff -c -r1.34 fd.h
*** src/include/storage/fd.h	5 Nov 2001 17:46:35 -0000	1.34
--- src/include/storage/fd.h	27 May 2002 23:05:59 -0000
***************
*** 66,72 ****
  extern void FileMarkDirty(File file);
  
  /* Operations that allow use of regular stdio --- USE WITH CAUTION */
! extern FILE *AllocateFile(char *name, char *mode);
  extern void FreeFile(FILE *);
  
  /* If you've really really gotta have a plain kernel FD, use this */
--- 66,72 ----
  extern void FileMarkDirty(File file);
  
  /* Operations that allow use of regular stdio --- USE WITH CAUTION */
! extern FILE *AllocateFile(const char *name, const char *mode);
  extern void FreeFile(FILE *);
  
  /* If you've really really gotta have a plain kernel FD, use this */
