mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
There are two implementation techniques: the executor understands a new JOIN_IN jointype, which emits at most one matching row per left-hand row, or the result of the IN's sub-select can be fed through a DISTINCT filter and then joined as an ordinary relation. Along the way, some minor code cleanup in the optimizer; notably, break out most of the jointree-rearrangement preprocessing in planner.c and put it in a new file prep/prepjointree.c.
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* tlist.h
|
|
* prototypes for tlist.c.
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: tlist.h,v 1.33 2003/01/20 18:55:06 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef TLIST_H
|
|
#define TLIST_H
|
|
|
|
#include "nodes/relation.h"
|
|
|
|
extern TargetEntry *tlistentry_member(Node *node, List *targetlist);
|
|
extern Resdom *tlist_member(Node *node, List *targetlist);
|
|
|
|
extern void add_var_to_tlist(RelOptInfo *rel, Var *var);
|
|
extern TargetEntry *create_tl_element(Var *var, int resdomno);
|
|
|
|
extern List *new_unsorted_tlist(List *targetlist);
|
|
extern List *flatten_tlist(List *tlist);
|
|
extern List *add_to_flat_tlist(List *tlist, List *vars);
|
|
|
|
extern Var *get_expr(TargetEntry *tle);
|
|
|
|
extern TargetEntry *get_sortgroupclause_tle(SortClause *sortClause,
|
|
List *targetList);
|
|
extern Node *get_sortgroupclause_expr(SortClause *sortClause,
|
|
List *targetList);
|
|
extern List *get_sortgrouplist_exprs(List *sortClauses,
|
|
List *targetList);
|
|
|
|
#endif /* TLIST_H */
|