Index: src/bin/pg_dump/pg_backup_archiver.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v retrieving revision 1.127 diff -c -c -r1.127 pg_backup_archiver.c *** src/bin/pg_dump/pg_backup_archiver.c 19 Apr 2006 16:02:17 -0000 1.127 --- src/bin/pg_dump/pg_backup_archiver.c 13 May 2006 05:02:23 -0000 *************** *** 2017,2022 **** --- 2017,2039 ---- /* Make sure function checking is disabled */ ahprintf(AH, "SET check_function_bodies = false;\n"); + /* + * We are using backslash escapes, so make sure they are enabled. + * Older servers might not understand these variables, so we + * turn off error reporting. + */ + ahprintf(AH, "\n-- Set escape environment for possible loading into version >= 8.2.\n"); + ahprintf(AH, "-- If variables are not supported, suppress error messages.\n"); + ahprintf(AH, "SET client_min_messages = panic;\n"); + /* In 7.3, this was server_min_messages */ + ahprintf(AH, "SET log_min_messages = log;\n"); + ahprintf(AH, "SET log_min_error_statement = panic;\n"); + ahprintf(AH, "SET escape_string_warning = off;\n"); + ahprintf(AH, "SET standard_conforming_strings = off;\n"); + ahprintf(AH, "RESET log_min_error_statement;\n"); + ahprintf(AH, "RESET log_min_messages;\n"); + ahprintf(AH, "RESET client_min_messages;\n"); + /* Avoid annoying notices etc */ ahprintf(AH, "SET client_min_messages = warning;\n");