]> granicus.if.org Git - postgresql/commitdiff
SET_ARGS cleanup
authorBruce Momjian <bruce@momjian.us>
Tue, 2 Feb 1999 23:53:26 +0000 (23:53 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 2 Feb 1999 23:53:26 +0000 (23:53 +0000)
src/backend/nodes/equalfuncs.c
src/backend/optimizer/util/pathnode.c
src/include/utils/ps_status.h

index 7a82ad99fdcbb7bdc6438f6d1c0e8af7f4971140..763a9d48354a846e8eeaf594644046bd4583f268 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.20 1998/09/01 04:29:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.21 1999/02/02 23:53:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -422,11 +422,11 @@ _equalMergePath(MergePath *a, MergePath *b)
 
        if (!_equalJoinPath((JoinPath *) a, (JoinPath *) b))
                return false;
-       if (!equal((a->path_mergeclauses), (b->path_mergeclauses)))
+       if (!equal(a->path_mergeclauses, b->path_mergeclauses))
                return false;
-       if (!equal((a->outersortkeys), (b->outersortkeys)))
+       if (!equal(a->outersortkeys, b->outersortkeys))
                return false;
-       if (!equal((a->innersortkeys), (b->innersortkeys)))
+       if (!equal(a->innersortkeys, b->innersortkeys))
                return false;
        return true;
 }
index d7dcbcc84f9e201e5f3353aa3142d2ba179d50d9..d8ac6247a1b95404c1d460775537bcf6a7e437a5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.13 1998/09/21 15:41:28 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.14 1999/02/02 23:53:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,18 +157,13 @@ better_path(Path *new_path, List *unique_paths, bool *noOther)
        List       *temp = NIL;
        Path       *retval = NULL;
 
-       /*
-        * XXX - added the following two lines which weren't int the lisp
-        * planner, but otherwise, doesn't seem to work for the case where
-        * new_path is 'nil
-        */
        foreach(temp, unique_paths)
        {
                path = (Path *) lfirst(temp);
 
-               if ((equal_path_path_ordering(&new_path->p_ordering,
-                                                                         &path->p_ordering) &&
-                        samekeys(new_path->keys, path->keys)))
+               if (samekeys(path->keys, new_path->keys) &&
+                       equal_path_path_ordering(&path->p_ordering,
+                                                                        &new_path->p_ordering))
                {
                        old_path = path;
                        break;
index 11d64cdb4dc36638adb365a787800c3e7abdcf86..28a90170fe445840cc1004fdae7c6a2cd9cbe1f2 100644 (file)
@@ -31,6 +31,7 @@ char *ps_status_buffer = NULL;
                ps_status_buffer = (argv)[0]; \
                sprintf(ps_status_buffer, "%s %s %s %s ", execname, username, hostname, dbname); \
                ps_status_buffer += strlen(ps_status_buffer); \
+               ps_status_buffer[0] = '\0'; \
        }
 
 #define PS_CLEAR_STATUS() \
@@ -41,7 +42,7 @@ char *ps_status_buffer = NULL;
                if (ps_status_buffer) \
                { \
                        PS_CLEAR_STATUS(); \
-                       strcat(ps_status_buffer, status); \
+                       strcpy(ps_status_buffer, status); \
                } \
        }