From a793e951b6be858bc74f4174365592075e0d50c0 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 25 Jul 2017 08:21:36 +0900 Subject: [PATCH] Remove unused function PQExpBuffers used to generate SQL, no need to worry about maximum query length and more flexible for generating dynamic queries. --- strutil.c | 13 ------------- strutil.h | 4 ---- 2 files changed, 17 deletions(-) diff --git a/strutil.c b/strutil.c index 56ee0599..a3e0b4b2 100644 --- a/strutil.c +++ b/strutil.c @@ -35,19 +35,6 @@ xvsnprintf(char *str, size_t size, const char *format, va_list ap) } -int -sqlquery_snprintf(char *str, const char *format,...) -{ - va_list arglist; - int retval; - - va_start(arglist, format); - retval = xvsnprintf(str, MAX_QUERY_LEN, format, arglist); - va_end(arglist); - - return retval; -} - int maxlen_snprintf(char *str, const char *format,...) { diff --git a/strutil.h b/strutil.h index 75aeb0c8..54e8a6fe 100644 --- a/strutil.h +++ b/strutil.h @@ -32,10 +32,6 @@ typedef struct ItemList } ItemList; -extern int -sqlquery_snprintf(char *str, const char *format,...) -__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3))); - extern int maxlen_snprintf(char *str, const char *format,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));