aboutsummaryrefslogtreecommitdiff
path: root/src/include/lib/stringinfo.h
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>1998-12-18 14:45:09 +0000
committerJan Wieck <JanWieck@Yahoo.com>1998-12-18 14:45:09 +0000
commiteeff2c94bea07c55a79bcf518411068e2bc07dd8 (patch)
treee5f96e8dff15a3a53e48124e47015eb2c2554054 /src/include/lib/stringinfo.h
parent3498d878cb5951fcfaae2ca78f46eacf0b140e7b (diff)
downloadpostgresql-eeff2c94bea07c55a79bcf518411068e2bc07dd8.tar.gz
postgresql-eeff2c94bea07c55a79bcf518411068e2bc07dd8.zip
Fixed nodeToString() to put out "<>" for NULL strings again.
More cleanups to appendStringInfo() usage in node/outfuncs.c. Jan
Diffstat (limited to 'src/include/lib/stringinfo.h')
-rw-r--r--src/include/lib/stringinfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h
index 269342c84e0..a23148c6bd5 100644
--- a/src/include/lib/stringinfo.h
+++ b/src/include/lib/stringinfo.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: stringinfo.h,v 1.8 1998/12/14 08:11:17 scrappy Exp $
+ * $Id: stringinfo.h,v 1.9 1998/12/18 14:45:09 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,4 +44,10 @@ extern StringInfo makeStringInfo(void);
*/
extern void appendStringInfo(StringInfo str, const char *fmt,...);
+/*------------------------
+ * nullStringInfo
+ * return the string itself or "<>" if it is NULL
+ */
+#define stringStringInfo(s) (((s) == NULL) ? "<>" : (s))
+
#endif /* STRINGINFO_H */