Diff for /pgsql/contrib/dblink/dblink.c between versions 1.38.4.4 and 1.38.4.5

version 1.38.4.4, 2010/02/03 23:02:16 version 1.38.4.5, 2010/06/03 09:45:47
Line 48 Line 48
 #include "nodes/execnodes.h"  #include "nodes/execnodes.h"
 #include "nodes/pg_list.h"  #include "nodes/pg_list.h"
 #include "parser/parse_type.h"  #include "parser/parse_type.h"
   #include "parser/scansup.h"
 #include "tcop/tcopprot.h"  #include "tcop/tcopprot.h"
 #include "utils/builtins.h"  #include "utils/builtins.h"
 #include "utils/fmgroids.h"  #include "utils/fmgroids.h"
Line 2075  static remoteConn * Line 2076  static remoteConn *
 getConnectionByName(const char *name)  getConnectionByName(const char *name)
 {  {
         remoteConnHashEnt *hentry;          remoteConnHashEnt *hentry;
         char            key[NAMEDATALEN];          char       *key;
   
         if (!remoteConnHash)          if (!remoteConnHash)
                 remoteConnHash = createConnHash();                  remoteConnHash = createConnHash();
   
         MemSet(key, 0, NAMEDATALEN);          key = pstrdup(name);
         snprintf(key, NAMEDATALEN - 1, "%s", name);          truncate_identifier(key, strlen(key), true);
         hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,          hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,
                                                                                            key, HASH_FIND, NULL);                                                                                             key, HASH_FIND, NULL);
   
Line 2107  createNewConnection(const char *name, re Line 2108  createNewConnection(const char *name, re
 {  {
         remoteConnHashEnt *hentry;          remoteConnHashEnt *hentry;
         bool            found;          bool            found;
         char            key[NAMEDATALEN];          char       *key;
   
         if (!remoteConnHash)          if (!remoteConnHash)
                 remoteConnHash = createConnHash();                  remoteConnHash = createConnHash();
   
         MemSet(key, 0, NAMEDATALEN);          key = pstrdup(name);
         snprintf(key, NAMEDATALEN - 1, "%s", name);          truncate_identifier(key, strlen(key), true);
         hentry = (remoteConnHashEnt *) hash_search(remoteConnHash, key,          hentry = (remoteConnHashEnt *) hash_search(remoteConnHash, key,
                                                                                            HASH_ENTER, &found);                                                                                             HASH_ENTER, &found);
   
Line 2136  deleteConnection(const char *name) Line 2137  deleteConnection(const char *name)
 {  {
         remoteConnHashEnt *hentry;          remoteConnHashEnt *hentry;
         bool            found;          bool            found;
         char            key[NAMEDATALEN];          char       *key;
   
         if (!remoteConnHash)          if (!remoteConnHash)
                 remoteConnHash = createConnHash();                  remoteConnHash = createConnHash();
   
         MemSet(key, 0, NAMEDATALEN);          key = pstrdup(name);
         snprintf(key, NAMEDATALEN - 1, "%s", name);          truncate_identifier(key, strlen(key), true);
   
         hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,          hentry = (remoteConnHashEnt *) hash_search(remoteConnHash,
                                                                                            key, HASH_REMOVE, &found);                                                                                             key, HASH_REMOVE, &found);
   

Removed from v.1.38.4.4  
changed lines
  Added in v.1.38.4.5


PostgreSQL CVSweb <[email protected]>