Header And Logo

PostgreSQL
| The world's most advanced open source database.

tlist.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * tlist.h
00004  *    prototypes for tlist.c.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/optimizer/tlist.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef TLIST_H
00015 #define TLIST_H
00016 
00017 #include "optimizer/var.h"
00018 
00019 
00020 extern TargetEntry *tlist_member(Node *node, List *targetlist);
00021 extern TargetEntry *tlist_member_ignore_relabel(Node *node, List *targetlist);
00022 
00023 extern List *flatten_tlist(List *tlist, PVCAggregateBehavior aggbehavior,
00024               PVCPlaceHolderBehavior phbehavior);
00025 extern List *add_to_flat_tlist(List *tlist, List *exprs);
00026 
00027 extern List *get_tlist_exprs(List *tlist, bool includeJunk);
00028 
00029 extern bool tlist_same_exprs(List *tlist1, List *tlist2);
00030 
00031 extern bool tlist_same_datatypes(List *tlist, List *colTypes, bool junkOK);
00032 extern bool tlist_same_collations(List *tlist, List *colCollations, bool junkOK);
00033 
00034 extern TargetEntry *get_sortgroupref_tle(Index sortref,
00035                      List *targetList);
00036 extern TargetEntry *get_sortgroupclause_tle(SortGroupClause *sgClause,
00037                         List *targetList);
00038 extern Node *get_sortgroupclause_expr(SortGroupClause *sgClause,
00039                          List *targetList);
00040 extern List *get_sortgrouplist_exprs(List *sgClauses,
00041                         List *targetList);
00042 
00043 extern Oid *extract_grouping_ops(List *groupClause);
00044 extern AttrNumber *extract_grouping_cols(List *groupClause, List *tlist);
00045 extern bool grouping_is_sortable(List *groupClause);
00046 extern bool grouping_is_hashable(List *groupClause);
00047 
00048 #endif   /* TLIST_H */