1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-12 02:37:31 +03:00

Escape processing patch:

o  turns off escape_string_warning in pg_dumpall.c
        o  optionally use E'' for \password (undocumented option?)
        o  honor standard_conforming-strings for \copy (but not
           support literal E'' strings)
        o  optionally use E'' for \d commands
        o  turn off escape_string_warning for createdb, createuser,
           droplang
This commit is contained in:
Bruce Momjian
2006-05-31 11:02:42 +00:00
parent 751d985805
commit eaca1175e9
8 changed files with 54 additions and 32 deletions

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.47 2006/03/06 19:49:20 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.48 2006/05/31 11:02:42 momjian Exp $
*/
#ifndef COMMON_H
#define COMMON_H
@@ -22,6 +22,12 @@
#define atooid(x) ((Oid) strtoul((x), NULL, 10))
/*
* We use this to prefix strings with E'' that we know are already safe,
* so we don't get an escape_string_warning.
*/
#define NEED_E_STR(str) ((strchr(str, '\\') && !standard_strings()) ? ESCAPE_STRING_SYNTAX : ' ')
/*
* Safer versions of some standard C library functions. If an
* out-of-memory condition occurs, these functions will bail out