mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Rename same() to sameseti() to have a slightly less generic name. Move
nonoverlap_sets() and is_subset() to list.c, where they should have lived to begin with, and rename to nonoverlap_setsi and is_subseti since they only work on integer lists.
This commit is contained in:
@ -8,13 +8,12 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.21 2000/01/26 05:56:40 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.22 2000/02/06 03:27:33 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
|
||||
#include "optimizer/internal.h"
|
||||
#include "optimizer/pathnode.h"
|
||||
#include "optimizer/plancat.h"
|
||||
@ -97,17 +96,14 @@ get_join_rel(Query *root, Relids relid)
|
||||
RelOptInfo *
|
||||
rel_member(Relids relids, List *rels)
|
||||
{
|
||||
if (relids != NIL && rels != NIL)
|
||||
List *temp;
|
||||
|
||||
foreach(temp, rels)
|
||||
{
|
||||
List *temp;
|
||||
RelOptInfo *rel = (RelOptInfo *) lfirst(temp);
|
||||
|
||||
foreach(temp, rels)
|
||||
{
|
||||
RelOptInfo *rel = (RelOptInfo *) lfirst(temp);
|
||||
|
||||
if (same(rel->relids, relids))
|
||||
return rel;
|
||||
}
|
||||
if (sameseti(rel->relids, relids))
|
||||
return rel;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user