Index: src/bin/pg_dump/pg_backup_archiver.c =================================================================== RCS file: /var/lib/cvs/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v retrieving revision 1.49 diff -c -r1.49 pg_backup_archiver.c *** src/bin/pg_dump/pg_backup_archiver.c 29 May 2002 01:49:57 -0000 1.49 --- src/bin/pg_dump/pg_backup_archiver.c 27 Jun 2002 23:29:42 -0000 *************** *** 2371,2377 **** /* Sort it, but ignore the header entries */ qsort(&(tea[1]), AH->tocCount, sizeof(TocEntry *), fn); ! /* Rebuild list: this works becuase we have headers at each end */ for (i = 1; i <= AH->tocCount; i++) { tea[i]->next = tea[i + 1]; --- 2371,2377 ---- /* Sort it, but ignore the header entries */ qsort(&(tea[1]), AH->tocCount, sizeof(TocEntry *), fn); ! /* Rebuild list: this works because we have headers at each end */ for (i = 1; i <= AH->tocCount; i++) { tea[i]->next = tea[i + 1]; Index: src/bin/pg_dump/pg_dump.c =================================================================== RCS file: /var/lib/cvs/pgsql/src/bin/pg_dump/pg_dump.c,v retrieving revision 1.267 diff -c -r1.267 pg_dump.c *** src/bin/pg_dump/pg_dump.c 20 Jun 2002 20:29:41 -0000 1.267 --- src/bin/pg_dump/pg_dump.c 27 Jun 2002 23:29:42 -0000 *************** *** 967,976 **** write_msg(NULL, "SQL command to dump the contents of table \"%s\" failed: PQendcopy() failed.\n", classname); write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn)); write_msg(NULL, "The command was: %s\n", q->data); - PQclear(res); exit_nicely(); } destroyPQExpBuffer(q); return 1; } --- 967,976 ---- write_msg(NULL, "SQL command to dump the contents of table \"%s\" failed: PQendcopy() failed.\n", classname); write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn)); write_msg(NULL, "The command was: %s\n", q->data); exit_nicely(); } + PQclear(res); destroyPQExpBuffer(q); return 1; } *************** *** 4757,4762 **** --- 4757,4771 ---- /* Dump Table Comments */ dumpTableComment(fout, tbinfo, reltypename, commentDeps); + + if (commentDeps) + { + for (j = 0; (*commentDeps)[j] != NULL; j++) + { + free((void *) (*commentDeps)[j]); + } + free(commentDeps); + } destroyPQExpBuffer(query); destroyPQExpBuffer(q); Index: src/bin/pg_dump/pg_dump.h =================================================================== RCS file: /var/lib/cvs/pgsql/src/bin/pg_dump/pg_dump.h,v retrieving revision 1.88 diff -c -r1.88 pg_dump.h *** src/bin/pg_dump/pg_dump.h 20 Jun 2002 20:29:41 -0000 1.88 --- src/bin/pg_dump/pg_dump.h 27 Jun 2002 23:29:42 -0000 *************** *** 156,166 **** extern char g_opaque_type[10]; /* name for the opaque type */ - /* pg_dump is really two programs in one - one version works with postgres v4r2 - and the other works with postgreSQL - the common routines are declared here - */ /* * common utility functions */ --- 156,161 ----