Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
parsetree.h62 linesDownload Raw Back to parser
1/*-------------------------------------------------------------------------2 *3 * parsetree.h4 *	  Routines to access various components and subcomponents of5 *	  parse trees.6 *7 *8 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group9 * Portions Copyright (c) 1994, Regents of the University of California10 *11 * src/include/parser/parsetree.h12 *13 *-------------------------------------------------------------------------14 */15#ifndef PARSETREE_H16#define PARSETREE_H17 18#include "nodes/parsenodes.h"19 20 21/* ----------------22 *		range table operations23 * ----------------24 */25 26/*27 *		rt_fetch28 *29 * NB: this will crash and burn if handed an out-of-range RT index30 */31#define rt_fetch(rangetable_index, rangetable) \32	((RangeTblEntry *) list_nth(rangetable, (rangetable_index)-1))33 34/*35 * Given an RTE and an attribute number, return the appropriate36 * variable name or alias for that attribute of that RTE.37 */38extern char *get_rte_attribute_name(RangeTblEntry *rte, AttrNumber attnum);39 40/*41 * Check whether an attribute of an RTE has been dropped42 */43extern bool get_rte_attribute_is_dropped(RangeTblEntry *rte,44										 AttrNumber attnum);45 46 47/* ----------------48 *		target list operations49 * ----------------50 */51 52extern TargetEntry *get_tle_by_resno(List *tlist, AttrNumber resno);53 54/* ----------------55 *		FOR UPDATE/SHARE info56 * ----------------57 */58 59extern RowMarkClause *get_parse_rowmark(Query *qry, Index rtindex);60 61#endif							/* PARSETREE_H */62 
codekingpro/portable-devtools · Team Ai