minor nodeHash cleanup

Поиск
Список
Период
Сортировка
От Neil Conway
Тема minor nodeHash cleanup
Дата
Msg-id 424AAF43.2080803@samurai.com
обсуждение исходный текст
Ответы Re: minor nodeHash cleanup
Список pgsql-patches
ExecHash() currently returns a null TupleTableSlot, and a misleading
comment from 1991 claims there is a good reason for this. AFAICS there
isn't and the return value isn't used, so I've changed it to return NULL.

Barring any objections I'll apply this tomorrow.

-Neil
Index: src/backend/executor/nodeHash.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql/src/backend/executor/nodeHash.c,v
retrieving revision 1.91
diff -c -r1.91 nodeHash.c
*** src/backend/executor/nodeHash.c    16 Mar 2005 21:38:07 -0000    1.91
--- src/backend/executor/nodeHash.c    30 Mar 2005 12:57:07 -0000
***************
*** 54,60 ****
       * get state info from node
       */
      outerNode = outerPlanState(node);
-
      hashtable = node->hashtable;

      /*
--- 54,59 ----
***************
*** 78,88 ****
          ExecHashTableInsert(hashtable, ExecFetchSlotTuple(slot), hashvalue);
      }

!     /*
!      * Return the slot so that we have the tuple descriptor when we need
!      * to save/restore them.  -Jeff 11 July 1991  (XXX isn't this dead code?)
!      */
!     return slot;
  }

  /* ----------------------------------------------------------------
--- 77,84 ----
          ExecHashTableInsert(hashtable, ExecFetchSlotTuple(slot), hashvalue);
      }

!     /* We needn't return a tuple slot or anything else */
!     return NULL;
  }

  /* ----------------------------------------------------------------
Index: src/backend/executor/nodeHashjoin.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql/src/backend/executor/nodeHashjoin.c,v
retrieving revision 1.69
diff -c -r1.69 nodeHashjoin.c
*** src/backend/executor/nodeHashjoin.c    16 Mar 2005 21:38:07 -0000    1.69
--- src/backend/executor/nodeHashjoin.c    30 Mar 2005 11:17:36 -0000
***************
*** 97,104 ****
       * outer tuple; so we can stop scanning the inner scan if we matched
       * on the previous try.
       */
!     if (node->js.jointype == JOIN_IN &&
!         node->hj_MatchedOuter)
          node->hj_NeedNewOuter = true;

      /*
--- 97,103 ----
       * outer tuple; so we can stop scanning the inner scan if we matched
       * on the previous try.
       */
!     if (node->js.jointype == JOIN_IN && node->hj_MatchedOuter)
          node->hj_NeedNewOuter = true;

      /*

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] BUG #1563: wrong week returnded by date_trunc('week',
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: unused variable ShmemBootstrap