*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.77 2003/09/23 23:31:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.78 2003/10/03 20:10:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
AH->currUser = strdup(""); /* So it's valid, but we can free() it
* later if necessary */
AH->currSchema = strdup(""); /* ditto */
+ AH->chk_fn_bodies = true; /* assumed default state */
AH->toc = (TocEntry *) calloc(1, sizeof(TocEntry));
if (!AH->toc)
if (AH->currSchema)
free(AH->currSchema);
AH->currSchema = strdup("");
+
+ AH->chk_fn_bodies = true; /* assumed default state */
}
/*
_becomeOwner(AH, te);
_selectOutputSchema(AH, te->namespace);
+ /* If it's a function, make sure function checking is disabled */
+ if (AH->chk_fn_bodies && strcmp(te->desc, "FUNCTION") == 0)
+ {
+ ahprintf(AH, "SET check_function_bodies = false;\n\n");
+ AH->chk_fn_bodies = false;
+ }
+
if (isData)
pfx = "Data for ";
else
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.51 2003/08/04 00:43:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.52 2003/10/03 20:10:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
struct _tocEntry *toc; /* List of TOC entries */
int tocCount; /* Number of TOC entries */
struct _tocEntry *currToc; /* Used when dumping data */
- char *currUser; /* Restore: current username in script */
- char *currSchema; /* Restore: current schema in script */
int compression; /* Compression requested on open */
ArchiveMode mode; /* File mode - r or w */
void *formatData; /* Header data specific to file format */
RestoreOptions *ropt; /* Used to check restore options in
* ahwrite etc */
+
+ /* these vars track state to avoid sending redundant SET commands */
+ char *currUser; /* current username */
+ char *currSchema; /* current schema */
+ bool chk_fn_bodies; /* current state of check_function_bodies */
+
void *lo_buf;
size_t lo_buf_used;
size_t lo_buf_size;
* Implements the basic DB functions used by the archiver.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.49 2003/07/23 08:47:30 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.50 2003/10/03 20:10:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
PQfinish(AH->connection);
AH->connection = newConn;
- /* don't assume we still know the output schema */
- if (AH->currSchema)
- free(AH->currSchema);
- AH->currSchema = strdup("");
-
return 1;
}