From 41f18f021a0882eccbeca62e2ed4b66c6b96e9c9 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Mon, 8 Aug 2016 10:07:46 -0400 Subject: Promote pg_dumpall shell/connstr quoting functions to src/fe_utils. Rename these newly-extern functions with terms more typical of their new neighbors. No functional changes; a subsequent commit will use them in more places. Back-patch to 9.1 (all supported versions). Back branches lack src/fe_utils, so instead rename the functions in place; the subsequent commit will copy them into the other programs using them. Security: CVE-2016-5424 --- src/include/fe_utils/string_utils.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/include/fe_utils/string_utils.h') diff --git a/src/include/fe_utils/string_utils.h b/src/include/fe_utils/string_utils.h index 733e337910b..c709406628e 100644 --- a/src/include/fe_utils/string_utils.h +++ b/src/include/fe_utils/string_utils.h @@ -2,8 +2,8 @@ * * String-processing utility routines for frontend code * - * Assorted utility functions that are useful in constructing SQL queries - * and interpreting backend output. + * Utility functions that interpret backend output or quote strings for + * assorted contexts. * * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group @@ -40,6 +40,9 @@ extern void appendByteaLiteral(PQExpBuffer buf, const unsigned char *str, size_t length, bool std_strings); +extern void appendShellString(PQExpBuffer buf, const char *str); +extern void appendConnStrVal(PQExpBuffer buf, const char *str); + extern bool parsePGArray(const char *atext, char ***itemarray, int *nitems); extern bool appendReloptionsArray(PQExpBuffer buffer, const char *reloptions, -- cgit v1.2.3