Index: doc/src/sgml/ref/pg_dump.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql-server/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.54
diff -c -r1.54 pg_dump.sgml
*** doc/src/sgml/ref/pg_dump.sgml	6 Jan 2003 18:53:24 -0000	1.54
--- doc/src/sgml/ref/pg_dump.sgml	10 Jan 2003 22:21:31 -0000
***************
*** 284,289 ****
--- 284,312 ----
       </varlistentry>
  
       <varlistentry>
+       <term><option>-n <replaceable class="parameter">namespace</replaceable></option></term>
+       <term><option>--namespace=<replaceable class="parameter">namespace</replaceable></option></term>
+       <listitem>
+        <para>
+         Dump the contents of <replaceable
+         class="parameter">namespace</replaceable> only. If this option
+         is not specified, all non-system namespaces in the target
+         database will be dumped.
+        </para>
+ 
+        <note>
+         <para>
+          In this mode, <application>pg_dump</application> makes no
+          attempt to dump any other database objects that may depend
+          upon objects in the selected namespace. Therefore, there is
+          no guarantee that the results of a single namespace dump can
+          be successfully restored by themselves into a clean database.
+         </para>
+        </note>
+       </listitem>
+      </varlistentry>
+ 
+      <varlistentry>
        <term><option>-o</></term>
        <term><option>--oids</></term>
        <listitem>
***************
*** 380,387 ****
        <term><option>--table=<replaceable class="parameter">table</replaceable></option></term>
        <listitem>
         <para>
! 	Dump data for <replaceable class="parameter">table</replaceable> only.
!        </para>
        </listitem>
       </varlistentry>
  
--- 403,424 ----
        <term><option>--table=<replaceable class="parameter">table</replaceable></option></term>
        <listitem>
         <para>
! 	Dump data for <replaceable class="parameter">table</replaceable>
! 	only. If <literal>*</literal> is specified, all tables in the
! 	specified database will be dumped. It is possible for there to be
! 	multiple tables with the same name in different schemas; if that
! 	is the case, all matching tables will be dumped.
!        </para>
! 
!        <note>
!         <para>
!          In this mode, <application>pg_dump</application> makes no
!          attempt to dump any other database objects that may depend
!          upon the selected table. Therefore, there is no guarantee
!          that the results of a single table dump can be successfully
!          restored by themselves into a clean database.
!         </para>
!        </note>
        </listitem>
       </varlistentry>
  
***************
*** 495,504 ****
        <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
        <listitem>
         <para>
! 	Specifies the host name of the machine on which the 
! 	server
! 	is running.  If host begins with a slash, it is used 
! 	as the directory for the Unix domain socket.
         </para>
        </listitem>
       </varlistentry>
--- 532,540 ----
        <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
        <listitem>
         <para>
! 	Specifies the host name of the machine on which the server is
! 	running.  If the host name begins with a slash, it is used as the
! 	directory for the Unix domain socket.
         </para>
        </listitem>
       </varlistentry>
***************
*** 551,557 ****
  
      <listitem>
       <para>
!       Default connection parameters
       </para>
      </listitem>
     </varlistentry>
--- 587,593 ----
  
      <listitem>
       <para>
!       Default connection parameters.
       </para>
      </listitem>
     </varlistentry>
***************
*** 578,588 ****
  
      <msgexplan>
         <para>
! 	<application>pg_dump</application> could not attach to the 
! 	PostgreSQL server on the specified host and port.  If you see this message,
! 	ensure that the server
! 	is running on the proper host and that you have specified the proper
! 	port.
         </para>
      </msgexplan>
     </msgentry>
--- 614,623 ----
  
      <msgexplan>
         <para>
! 	<application>pg_dump</application> could not connect to the
! 	PostgreSQL server on the specified host and port.  If you see this
! 	message, ensure that the server is running on the proper host and
! 	that you have specified the proper port.
         </para>
      </msgexplan>
     </msgentry>
***************
*** 630,636 ****
  
      <listitem>
       <para>
!       When doing a data only dump, <application>pg_dump</application> emits queries
        to disable triggers on user tables before inserting the data and queries to
        re-enable them after the data has been inserted.  If the restore is stopped
        in the middle, the system catalogs may be left in the wrong state.
--- 665,671 ----
  
      <listitem>
       <para>
!       When doing a data-only dump, <application>pg_dump</application> emits queries
        to disable triggers on user tables before inserting the data and queries to
        re-enable them after the data has been inserted.  If the restore is stopped
        in the middle, the system catalogs may be left in the wrong state.
Index: src/bin/pg_dump/pg_backup_db.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/bin/pg_dump/pg_backup_db.c,v
retrieving revision 1.43
diff -c -r1.43 pg_backup_db.c
*** src/bin/pg_dump/pg_backup_db.c	22 Oct 2002 19:15:23 -0000	1.43
--- src/bin/pg_dump/pg_backup_db.c	10 Jan 2003 22:27:49 -0000
***************
*** 62,68 ****
  	myversion = _parse_version(AH, PG_VERSION);
  
  	/*
! 	 *	Autocommit could be off.  We turn it off later but we have to check
  	 *	the database version first.
  	 */
  
--- 62,68 ----
  	myversion = _parse_version(AH, PG_VERSION);
  
  	/*
! 	 *	Autocommit could be off.  We turn it on later but we have to check
  	 *	the database version first.
  	 */
  
Index: src/bin/pg_dump/pg_dump.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.314
diff -c -r1.314 pg_dump.c
*** src/bin/pg_dump/pg_dump.c	6 Jan 2003 18:53:24 -0000	1.314
--- src/bin/pg_dump/pg_dump.c	10 Jan 2003 22:40:46 -0000
***************
*** 70,75 ****
--- 70,76 ----
  } DumpContext;
  
  static void help(const char *progname);
+ static void formatIdentifierArg(char *identifier);
  static NamespaceInfo *findNamespace(const char *nsoid, const char *objoid);
  static void dumpClasses(const TableInfo *tblinfo, const int numTables,
  			Archive *fout, const bool oids);
***************
*** 142,148 ****
  /* obsolete as of 7.3: */
  static Oid	g_last_builtin_oid; /* value of the last builtin oid */
  
! static char *selectTablename = NULL;	/* name of a single table to dump */
  
  char		g_opaque_type[10];	/* name for the opaque type */
  
--- 143,150 ----
  /* obsolete as of 7.3: */
  static Oid	g_last_builtin_oid; /* value of the last builtin oid */
  
! static char *selectTableName = NULL;	/* name of a single table to dump */
! static char *selectSchemaName = NULL;	/* name of a single schema to dump */
  
  char		g_opaque_type[10];	/* name for the opaque type */
  
***************
*** 196,201 ****
--- 198,204 ----
  		{"column-inserts", no_argument, NULL, 'D'},
  		{"host", required_argument, NULL, 'h'},
  		{"ignore-version", no_argument, NULL, 'i'},
+ 		{"namespace", required_argument, NULL, 'n'},
  		{"no-reconnect", no_argument, NULL, 'R'},
  		{"oids", no_argument, NULL, 'o'},
  		{"no-owner", no_argument, NULL, 'O'},
***************
*** 263,269 ****
  		}
  	}
  
! 	while ((c = getopt_long(argc, argv, "abcCdDf:F:h:ioOp:RsS:t:uU:vWxX:Z:",
  							long_options, &optindex)) != -1)
  	{
  		switch (c)
--- 266,272 ----
  		}
  	}
  
! 	while ((c = getopt_long(argc, argv, "abcCdDf:F:h:in:oOp:RsS:t:uU:vWxX:Z:",
  							long_options, &optindex)) != -1)
  	{
  		switch (c)
***************
*** 311,316 ****
--- 314,324 ----
  				ignore_version = true;
  				break;
  
+ 			case 'n':			/* Dump data for this schema only */
+ 				selectSchemaName = strdup(optarg);
+ 				formatIdentifierArg(selectSchemaName);
+ 				break;
+ 
  			case 'o':			/* Dump oids */
  				oids = true;
  				break;
***************
*** 337,375 ****
  				break;
  
  			case 't':			/* Dump data for this table only */
! 				{
! 					int			i;
  
! 					selectTablename = strdup(optarg);
  
- 					/*
- 					 * quoted string? Then strip quotes and preserve
- 					 * case...
- 					 */
- 					if (selectTablename[0] == '"')
- 					{
- 						char	   *endptr;
- 
- 						endptr = selectTablename + strlen(selectTablename) - 1;
- 						if (*endptr == '"')
- 							*endptr = '\0';
- 						strcpy(selectTablename, &selectTablename[1]);
- 					}
- 					else
- 					{
- 						/* otherwise, convert table name to lowercase... */
- 						for (i = 0; selectTablename[i]; i++)
- 							if (isupper((unsigned char) selectTablename[i]))
- 								selectTablename[i] = tolower((unsigned char) selectTablename[i]);
- 
- 						/*
- 						 * '*' is a special case meaning ALL tables, but
- 						 * only if unquoted
- 						 */
- 						if (strcmp(selectTablename, "*") == 0)
- 							selectTablename[0] = '\0';
- 					}
- 				}
  				break;
  
  			case 'u':
--- 345,362 ----
  				break;
  
  			case 't':			/* Dump data for this table only */
! 				selectTableName = strdup(optarg);
  
! 				/*
! 				 * '*' is a special case meaning ALL tables, but
! 				 * only if unquoted
! 				 */
! 				if (selectTableName[0] != '"' &&
! 					strcmp(selectTableName, "*") == 0)
! 					selectTableName[0] = '\0';
! 				else
! 					formatIdentifierArg(selectTableName);
  
  				break;
  
  			case 'u':
***************
*** 454,466 ****
  		exit(1);
  	}
  
! 	if (outputBlobs && selectTablename != NULL && strlen(selectTablename) > 0)
  	{
  		write_msg(NULL, "Large object output is not supported for a single table.\n");
  		write_msg(NULL, "Use all tables or a full dump instead.\n");
  		exit(1);
  	}
  
  	if (dumpData == true && oids == true)
  	{
  		write_msg(NULL, "INSERT (-d, -D) and OID (-o) options cannot be used together.\n");
--- 441,467 ----
  		exit(1);
  	}
  
! 	if (outputBlobs && selectTableName != NULL && strlen(selectTableName) > 0)
  	{
  		write_msg(NULL, "Large object output is not supported for a single table.\n");
  		write_msg(NULL, "Use all tables or a full dump instead.\n");
  		exit(1);
  	}
  
+ 	if (outputBlobs && selectSchemaName != NULL)
+ 	{
+ 		write_msg(NULL, "Large object output is not supported for a single namespace.");
+ 		write_msg(NULL, "Use a full dump instead.\n");
+ 		exit(1);
+ 	}
+ 
+ 	if (selectTableName != NULL && selectSchemaName != NULL)
+ 	{
+ 		write_msg(NULL, "Single table and single schema dumps cannot be used simultaneously.\n");
+ 		write_msg(NULL, "Use one option or the other, not both.\n");
+ 		exit(1);
+ 	}
+ 
  	if (dumpData == true && oids == true)
  	{
  		write_msg(NULL, "INSERT (-d, -D) and OID (-o) options cannot be used together.\n");
***************
*** 478,484 ****
  	/* open the output file */
  	switch (format[0])
  	{
- 
  		case 'c':
  		case 'C':
  			g_fout = CreateArchive(filename, archCustom, compressLevel);
--- 479,484 ----
***************
*** 526,532 ****
  	 * Open the database using the Archiver, so it knows about it. Errors
  	 * mean death.
  	 */
! 	g_conn = ConnectDatabase(g_fout, dbname, pghost, pgport, username, force_password, ignore_version);
  
  	/*
  	 * Start serializable transaction to dump consistent data.
--- 526,533 ----
  	 * Open the database using the Archiver, so it knows about it. Errors
  	 * mean death.
  	 */
! 	g_conn = ConnectDatabase(g_fout, dbname, pghost, pgport,
! 							 username, force_password, ignore_version);
  
  	/*
  	 * Start serializable transaction to dump consistent data.
***************
*** 665,670 ****
--- 666,672 ----
  	printf(_("  -C, --create             include commands to create database in dump\n"));
  	printf(_("  -d, --inserts            dump data as INSERT, rather than COPY, commands\n"));
  	printf(_("  -D, --column-inserts     dump data as INSERT commands with column names\n"));
+ 	printf(_("  -n, --namespace=NAME     dump this namespace only\n"));
  	printf(_("  -o, --oids               include OIDs in dump\n"));
  	printf(_("  -O, --no-owner           do not output \\connect commands in plain\n"
  			 "                           text format\n"));
***************
*** 692,697 ****
--- 694,731 ----
  	printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
  }
  
+ /*
+  * Accepts an identifier as specified as a command-line argument, and
+  * converts it into a form acceptable to the PostgreSQL backend. The
+  * input string is modified in-place.
+  */
+ static void
+ formatIdentifierArg(char *identifier)
+ {
+ 	/*
+ 	 * quoted string? Then strip quotes and preserve
+ 	 * case...
+ 	 */
+ 	if (identifier[0] == '"')
+ 	{
+ 		char	   *endptr;
+ 
+ 		endptr = identifier + strlen(identifier) - 1;
+ 		if (*endptr == '"')
+ 			*endptr = '\0';
+ 		strcpy(identifier, &identifier[1]);
+ 	}
+ 	else
+ 	{
+ 		int i;
+ 
+ 		/* otherwise, convert identifier name to lowercase... */
+ 		for (i = 0; identifier[i]; i++)
+ 			if (isupper((unsigned char) identifier[i]))
+ 				identifier[i] = tolower((unsigned char) identifier[i]);
+ 	}
+ }
+ 
  void
  exit_nicely(void)
  {
***************
*** 710,719 ****
  {
  	/*
  	 * If a specific table is being dumped, do not dump any complete
! 	 * namespaces.	Otherwise, dump all non-system namespaces.
  	 */
! 	if (selectTablename != NULL)
  		nsinfo->dump = false;
  	else if (strncmp(nsinfo->nspname, "pg_", 3) == 0 ||
  			 strcmp(nsinfo->nspname, "information_schema") == 0)
  		nsinfo->dump = false;
--- 744,761 ----
  {
  	/*
  	 * If a specific table is being dumped, do not dump any complete
! 	 * namespaces.  If a specific namespace is being dumped, dump just
! 	 * that namespace. Otherwise, dump all non-system namespaces. 
  	 */
! 	if (selectTableName != NULL)
  		nsinfo->dump = false;
+ 	else if (selectSchemaName != NULL)
+ 	{
+ 		if (strcmp(nsinfo->nspname, selectSchemaName) == 0)
+ 			nsinfo->dump = true;
+ 		else
+ 			nsinfo->dump = false;
+ 	}
  	else if (strncmp(nsinfo->nspname, "pg_", 3) == 0 ||
  			 strcmp(nsinfo->nspname, "information_schema") == 0)
  		nsinfo->dump = false;
***************
*** 735,742 ****
  	 */
  	if (tbinfo->relnamespace->dump)
  		tbinfo->dump = true;
! 	else if (selectTablename != NULL)
! 		tbinfo->dump = (strcmp(tbinfo->relname, selectTablename) == 0);
  	else
  		tbinfo->dump = false;
  }
--- 777,784 ----
  	 */
  	if (tbinfo->relnamespace->dump)
  		tbinfo->dump = true;
! 	else if (selectTableName != NULL)
! 		tbinfo->dump = (strcmp(tbinfo->relname, selectTableName) == 0);
  	else
  		tbinfo->dump = false;
  }
***************
*** 1442,1447 ****
--- 1484,1508 ----
  					  nsinfo[i].nspname);
  	}
  
+ 	/*
+ 	 * If the user attempted to dump a specific namespace, check to
+ 	 * ensure that the specified namespace actually exists.
+ 	 */
+ 	if (selectSchemaName)
+ 	{
+ 		for (i = 0; i < ntups; i++)
+ 			if (strcmp(nsinfo[i].nspname, selectSchemaName) == 0)
+ 				break;
+ 
+ 		/* Didn't find a match */
+ 		if (i == ntups)
+ 		{
+ 			write_msg(NULL, "Specified schema \"%s\" does not exist.\n",
+ 					  selectSchemaName);
+ 			exit_nicely();
+ 		}
+ 	}
+ 
  	PQclear(res);
  	destroyPQExpBuffer(query);
  
***************
*** 2243,2248 ****
--- 2304,2330 ----
  					  tblinfo[i].relname);
  	}
  
+ 	/*
+ 	 * If the user is attempting to dump a specific table, check to
+ 	 * ensure that the specified table actually exists (and is a table
+ 	 * or a view, not a sequence).
+ 	 */
+ 	if (selectTableName)
+ 	{
+ 		for (i = 0; i < ntups; i++)
+ 			if (strcmp(tblinfo[i].relname, selectTableName) == 0 &&
+ 				tblinfo[i].relkind != 'S')
+ 				break;
+ 
+ 		/* Didn't find a match */
+ 		if (i == ntups)
+ 		{
+ 			write_msg(NULL, "Specified table \"%s\" does not exist.\n",
+ 					  selectTableName);
+ 			exit_nicely();
+ 		}
+ 	}
+ 
  	PQclear(res);
  	destroyPQExpBuffer(query);
  	destroyPQExpBuffer(delqry);
***************
*** 2600,2606 ****
  	 * setting, instead.
  	 */
  
! 	/*** Build query to find comment ***/
  
  	query = createPQExpBuffer();
  
--- 2682,2688 ----
  	 * setting, instead.
  	 */
  
! 	/* Build query to find comment */
  
  	query = createPQExpBuffer();
  
***************
*** 2626,2632 ****
  		appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = '%s'::oid", oid);
  	}
  
! 	/*** Execute query ***/
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
--- 2708,2714 ----
  		appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = '%s'::oid", oid);
  	}
  
! 	/* Execute query */
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
***************
*** 2636,2642 ****
  		exit_nicely();
  	}
  
! 	/*** If a comment exists, build COMMENT ON statement ***/
  
  	if (PQntuples(res) == 1)
  	{
--- 2718,2724 ----
  		exit_nicely();
  	}
  
! 	/* If a comment exists, build COMMENT ON statement */
  
  	if (PQntuples(res) == 1)
  	{
***************
*** 2683,2689 ****
  	 * setting, instead.
  	 */
  
! 	/*** Build query to find comments ***/
  
  	query = createPQExpBuffer();
  	target = createPQExpBuffer();
--- 2765,2771 ----
  	 * setting, instead.
  	 */
  
! 	/* Build query to find comments */
  
  	query = createPQExpBuffer();
  	target = createPQExpBuffer();
***************
*** 2710,2716 ****
  		appendPQExpBuffer(query, "SELECT description, 0 as objsubid FROM pg_description WHERE objoid = '%s'::oid", tbinfo->oid);
  	}
  
! 	/*** Execute query ***/
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
--- 2792,2798 ----
  		appendPQExpBuffer(query, "SELECT description, 0 as objsubid FROM pg_description WHERE objoid = '%s'::oid", tbinfo->oid);
  	}
  
! 	/* Execute query */
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
***************
*** 2722,2728 ****
  	i_description = PQfnumber(res, "description");
  	i_objsubid = PQfnumber(res, "objsubid");
  
! 	/*** If comments exist, build COMMENT ON statements ***/
  
  	ntups = PQntuples(res);
  	for (i = 0; i < ntups; i++)
--- 2804,2810 ----
  	i_description = PQfnumber(res, "description");
  	i_objsubid = PQfnumber(res, "objsubid");
  
! 	/* If comments exist, build COMMENT ON statements */
  
  	ntups = PQntuples(res);
  	for (i = 0; i < ntups; i++)
***************
*** 2787,2799 ****
  	/* Make sure we are in proper schema */
  	selectSourceSchema("pg_catalog");
  
! 	/*** Build query to find comment ***/
  
  	query = createPQExpBuffer();
  	appendPQExpBuffer(query, "SELECT oid FROM pg_database WHERE datname = ");
  	appendStringLiteral(query, PQdb(g_conn), true);
  
! 	/*** Execute query ***/
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
--- 2869,2881 ----
  	/* Make sure we are in proper schema */
  	selectSourceSchema("pg_catalog");
  
! 	/* Build query to find comment */
  
  	query = createPQExpBuffer();
  	appendPQExpBuffer(query, "SELECT oid FROM pg_database WHERE datname = ");
  	appendStringLiteral(query, PQdb(g_conn), true);
  
! 	/* Execute query */
  
  	res = PQexec(g_conn, query->data);
  	if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
***************
*** 2803,2809 ****
  		exit_nicely();
  	}
  
! 	/*** If a comment exists, build COMMENT ON statement ***/
  
  	if (PQntuples(res) != 0)
  	{
--- 2885,2891 ----
  		exit_nicely();
  	}
  
! 	/* If a comment exists, build COMMENT ON statement */
  
  	if (PQntuples(res) != 0)
  	{
***************
*** 2871,2877 ****
  						 nspinfo->usename, "SCHEMA", NULL,
  						 q->data, delq->data, NULL, NULL, NULL);
  
! 			/*** Dump Schema Comments ***/
  			resetPQExpBuffer(q);
  			appendPQExpBuffer(q, "SCHEMA %s", qnspname);
  			dumpComment(fout, q->data,
--- 2953,2959 ----
  						 nspinfo->usename, "SCHEMA", NULL,
  						 q->data, delq->data, NULL, NULL, NULL);
  
! 			/* Dump Schema Comments */
  			resetPQExpBuffer(q);
  			appendPQExpBuffer(q, "SCHEMA %s", qnspname);
  			dumpComment(fout, q->data,
***************
*** 3090,3096 ****
  				 tinfo->usename, "TYPE", deps,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/*** Dump Type Comments ***/
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "TYPE %s", fmtId(tinfo->typname));
--- 3172,3178 ----
  				 tinfo->usename, "TYPE", deps,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/* Dump Type Comments */
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "TYPE %s", fmtId(tinfo->typname));
***************
*** 3229,3235 ****
  				 tinfo->usename, "DOMAIN", deps,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/*** Dump Domain Comments ***/
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "DOMAIN %s", fmtId(tinfo->typname));
--- 3311,3317 ----
  				 tinfo->usename, "DOMAIN", deps,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/* Dump Domain Comments */
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "DOMAIN %s", fmtId(tinfo->typname));
***************
*** 3326,3332 ****
  				 tinfo->usename, "TYPE", NULL,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/*** Dump Type Comments ***/
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "TYPE %s", fmtId(tinfo->typname));
--- 3408,3414 ----
  				 tinfo->usename, "TYPE", NULL,
  				 q->data, delq->data, NULL, NULL, NULL);
  
! 	/* Dump Type Comments */
  	resetPQExpBuffer(q);
  
  	appendPQExpBuffer(q, "TYPE %s", fmtId(tinfo->typname));
***************
*** 3773,3779 ****
  				 q->data, delqry->data,
  				 NULL, NULL, NULL);
  
! 	/*** Dump Function Comments ***/
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "FUNCTION %s", funcsig);
--- 3855,3861 ----
  				 q->data, delqry->data,
  				 NULL, NULL, NULL);
  
! 	/* Dump Function Comments */
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "FUNCTION %s", funcsig);
***************
*** 4151,4157 ****
  				 q->data, delq->data,
  				 NULL, NULL, NULL);
  
! 	/*** Dump Operator Comments ***/
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "OPERATOR %s", oprid->data);
--- 4233,4239 ----
  				 q->data, delq->data,
  				 NULL, NULL, NULL);
  
! 	/* Dump Operator Comments */
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "OPERATOR %s", oprid->data);
***************
*** 4752,4758 ****
  				 q->data, delq->data,
  				 NULL, NULL, NULL);
  
! 	/*** Dump Aggregate Comments ***/
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "AGGREGATE %s", aggsig);
--- 4834,4840 ----
  				 q->data, delq->data,
  				 NULL, NULL, NULL);
  
! 	/* Dump Aggregate Comments */
  
  	resetPQExpBuffer(q);
  	appendPQExpBuffer(q, "AGGREGATE %s", aggsig);
***************
*** 4777,4788 ****
  
  
  /*
!  * These are some support functions to fix the acl problem of pg_dump
!  *
!  * Matthew C. Aycock 12/02/97
!  */
! 
! /* Append a keyword to a keyword list, inserting comma if needed.
   * Caller must make aclbuf big enough for all possible keywords.
   */
  static void
--- 4859,4865 ----
  
  
  /*
!  * Append a keyword to a keyword list, inserting comma if needed.
   * Caller must make aclbuf big enough for all possible keywords.
   */
  static void
