summaryrefslogtreecommitdiff
path: root/src/bin/psql/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/common.h')
-rw-r--r--src/bin/psql/common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h
index b12ccdec575..0d0f7ad5ed5 100644
--- a/src/bin/psql/common.h
+++ b/src/bin/psql/common.h
@@ -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
@@ -23,6 +23,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
* safely; therefore, their return value is guaranteed to be non-NULL.