Skip to content
Snippets Groups Projects
Commit 8b7aed00 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "res_config_pgsql: Fix removed support to previous for versions PostgreSQL 9.1"

parents f77a2367 cad68137
Branches
Tags
No related merge requests found
...@@ -52,6 +52,7 @@ AST_THREADSTORAGE(semibuf_buf); ...@@ -52,6 +52,7 @@ AST_THREADSTORAGE(semibuf_buf);
static PGconn *pgsqlConn = NULL; static PGconn *pgsqlConn = NULL;
static int version; static int version;
#define has_schema_support (version > 70300 ? 1 : 0) #define has_schema_support (version > 70300 ? 1 : 0)
#define USE_BACKSLASH_AS_STRING (version >= 90100 ? 1 : 0)
#define MAX_DB_OPTION_SIZE 64 #define MAX_DB_OPTION_SIZE 64
...@@ -384,7 +385,7 @@ static struct columns *find_column(struct tables *t, const char *colname) ...@@ -384,7 +385,7 @@ static struct columns *find_column(struct tables *t, const char *colname)
} }
#define IS_SQL_LIKE_CLAUSE(x) ((x) && ast_ends_with(x, " LIKE")) #define IS_SQL_LIKE_CLAUSE(x) ((x) && ast_ends_with(x, " LIKE"))
static char *ESCAPE_CLAUSE = " ESCAPE '\\'"; #define ESCAPE_CLAUSE (USE_BACKSLASH_AS_STRING ? " ESCAPE '\\'" : " ESCAPE '\\\\'")
static struct ast_variable *realtime_pgsql(const char *database, const char *tablename, const struct ast_variable *fields) static struct ast_variable *realtime_pgsql(const char *database, const char *tablename, const struct ast_variable *fields)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment