summaryrefslogtreecommitdiff
path: root/contrib/dblink/dblink.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dblink/dblink.c')
-rw-r--r--contrib/dblink/dblink.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 4bfa7670fd..19b98fb73d 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -8,8 +8,8 @@
* Darko Prenosil <Darko.Prenosil@finteh.hr>
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
*
- * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.99 2010/07/06 19:18:54 momjian Exp $
- * Copyright (c) 2001-2010, PostgreSQL Global Development Group
+ * contrib/dblink/dblink.c
+ * Copyright (c) 2001-2011, PostgreSQL Global Development Group
* ALL RIGHTS RESERVED;
*
* Permission to use, copy, modify, and distribute this software and its
@@ -91,7 +91,6 @@ static char **get_text_array_contents(ArrayType *array, int *numitems);
static char *get_sql_insert(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals, char **tgt_pkattvals);
static char *get_sql_delete(Relation rel, int *pkattnums, int pknumatts, char **tgt_pkattvals);
static char *get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals, char **tgt_pkattvals);
-static char *quote_literal_cstr(char *rawstr);
static char *quote_ident_cstr(char *rawstr);
static int get_attnum_pk_pos(int *pkattnums, int pknumatts, int key);
static HeapTuple get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals);
@@ -1894,25 +1893,6 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
}
/*
- * Return a properly quoted literal value.
- * Uses quote_literal in quote.c
- */
-static char *
-quote_literal_cstr(char *rawstr)
-{
- text *rawstr_text;
- text *result_text;
- char *result;
-
- rawstr_text = cstring_to_text(rawstr);
- result_text = DatumGetTextP(DirectFunctionCall1(quote_literal,
- PointerGetDatum(rawstr_text)));
- result = text_to_cstring(result_text);
-
- return result;
-}
-
-/*
* Return a properly quoted identifier.
* Uses quote_ident in quote.c
*/
@@ -2109,7 +2089,7 @@ getConnectionByName(const char *name)
remoteConnHash = createConnHash();
key = pstrdup(name);
- truncate_identifier(key, strlen(key), true);
+ truncate_identifier(key, strlen(key), false);
hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,
key, HASH_FIND, NULL);
@@ -2170,7 +2150,7 @@ deleteConnection(const char *name)
remoteConnHash = createConnHash();
key = pstrdup(name);
- truncate_identifier(key, strlen(key), true);
+ truncate_identifier(key, strlen(key), false);
hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,
key, HASH_REMOVE, &found);