PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_aggregate.h"
#include "catalog/pg_collation.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "parser/parse_collate.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
struct | assign_collations_context |
Enumerations | |
enum | CollateStrength { COLLATE_NONE , COLLATE_IMPLICIT , COLLATE_CONFLICT , COLLATE_EXPLICIT } |
Functions | |
static bool | assign_query_collations_walker (Node *node, ParseState *pstate) |
static bool | assign_collations_walker (Node *node, assign_collations_context *context) |
static void | merge_collation_state (Oid collation, CollateStrength strength, int location, Oid collation2, int location2, assign_collations_context *context) |
static void | assign_aggregate_collations (Aggref *aggref, assign_collations_context *loccontext) |
static void | assign_ordered_set_collations (Aggref *aggref, assign_collations_context *loccontext) |
static void | assign_hypothetical_collations (Aggref *aggref, assign_collations_context *loccontext) |
void | assign_query_collations (ParseState *pstate, Query *query) |
void | assign_list_collations (ParseState *pstate, List *exprs) |
void | assign_expr_collations (ParseState *pstate, Node *expr) |
Oid | select_common_collation (ParseState *pstate, List *exprs, bool none_ok) |
enum CollateStrength |
Enumerator | |
---|---|
COLLATE_NONE | |
COLLATE_IMPLICIT | |
COLLATE_CONFLICT | |
COLLATE_EXPLICIT |
Definition at line 56 of file parse_collate.c.
|
static |
Definition at line 881 of file parse_collate.c.
References Aggref::aggdirectargs, Aggref::args, Assert, assign_collations_walker(), assign_expr_collations(), lfirst_node, NIL, and assign_collations_context::pstate.
Referenced by assign_collations_walker().
|
static |
Definition at line 255 of file parse_collate.c.
References Aggref::aggfilter, WindowFunc::aggfilter, WindowFunc::args, CaseExpr::args, RowExpr::args, Assert, assign_aggregate_collations(), assign_expr_collations(), assign_hypothetical_collations(), assign_list_collations(), assign_ordered_set_collations(), COLLATE_CONFLICT, COLLATE_EXPLICIT, COLLATE_IMPLICIT, COLLATE_NONE, assign_collations_context::collation, assign_collations_context::collation2, CollateExpr::collOid, context, CaseExpr::defresult, elog, ereport, errcode(), errhint(), errmsg(), ERROR, TargetEntry::expr, exprCollation(), expression_tree_walker, exprLocation(), exprSetCollation(), exprSetInputCollation(), exprType(), forboth, get_collation_name(), get_typcollation(), InvalidOid, lappend_oid(), RowCompareExpr::largs, lfirst, lfirst_node, linitial_node, list_make2, assign_collations_context::location, CollateExpr::location, assign_collations_context::location2, merge_collation_state(), NIL, nodeTag, OidIsValid, parser_errposition(), assign_collations_context::pstate, RowCompareExpr::rargs, SubscriptingRef::refassgnexpr, SubscriptingRef::refexpr, SubscriptingRef::reflowerindexpr, SubscriptingRef::refupperindexpr, CoerceToDomain::resulttype, select_common_collation(), assign_collations_context::strength, and Query::targetList.
Referenced by assign_aggregate_collations(), assign_expr_collations(), assign_hypothetical_collations(), assign_ordered_set_collations(), and select_common_collation().
void assign_expr_collations | ( | ParseState * | pstate, |
Node * | expr | ||
) |
Definition at line 177 of file parse_collate.c.
References assign_collations_walker(), COLLATE_NONE, context, and InvalidOid.
Referenced by AlterPolicy(), assign_aggregate_collations(), assign_collations_walker(), assign_list_collations(), assign_ordered_set_collations(), assign_query_collations_walker(), ATPrepAlterColumnType(), buildMergedJoinVar(), coerce_fn_result_column(), cookConstraint(), cookDefault(), CreatePolicy(), CreateTriggerFiringOn(), DoCopy(), domainAddCheckConstraint(), EvaluateParams(), interpret_function_parameter_list(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformCallStmt(), transformCaseExpr(), transformIndexStmt(), transformJsonTableColumns(), transformPartitionBoundValue(), transformPartitionSpec(), TransformPubWhereClauses(), transformRangeTableFunc(), transformRangeTableSample(), transformRuleStmt(), and transformStatsStmt().
|
static |
Definition at line 955 of file parse_collate.c.
References Aggref::aggdirectargs, Aggref::aggfnoid, Aggref::args, Assert, assign_collations_walker(), COERCE_IMPLICIT_CAST, COLLATE_CONFLICT, COLLATE_NONE, assign_collations_context::collation, assign_collations_context::collation2, ereport, errcode(), errhint(), errmsg(), ERROR, TargetEntry::expr, exprCollation(), exprType(), exprTypmod(), get_collation_name(), get_func_variadictype(), InvalidOid, lfirst, list_head(), list_length(), lnext(), assign_collations_context::location, assign_collations_context::location2, makeRelabelType(), merge_collation_state(), OidIsValid, parser_errposition(), assign_collations_context::pstate, and assign_collations_context::strength.
Referenced by assign_collations_walker().
void assign_list_collations | ( | ParseState * | pstate, |
List * | exprs | ||
) |
Definition at line 155 of file parse_collate.c.
References assign_expr_collations(), and lfirst.
Referenced by assign_collations_walker(), assign_query_collations_walker(), and transformRangeFunction().
|
static |
Definition at line 919 of file parse_collate.c.
References Aggref::aggdirectargs, Aggref::aggfnoid, Aggref::args, assign_collations_walker(), assign_expr_collations(), get_func_variadictype(), InvalidOid, lfirst_node, list_length(), and assign_collations_context::pstate.
Referenced by assign_collations_walker().
void assign_query_collations | ( | ParseState * | pstate, |
Query * | query | ||
) |
Definition at line 101 of file parse_collate.c.
References assign_query_collations_walker(), QTW_IGNORE_CTE_SUBQUERIES, QTW_IGNORE_RANGE_TABLE, and query_tree_walker.
Referenced by transformDeleteStmt(), transformMergeStmt(), transformPLAssignStmt(), transformReturnStmt(), transformSelectStmt(), transformSetOperationStmt(), transformUpdateStmt(), and transformValuesClause().
|
static |
Definition at line 126 of file parse_collate.c.
References assign_expr_collations(), assign_list_collations(), and IsA.
Referenced by assign_query_collations().
|
static |
Definition at line 780 of file parse_collate.c.
References COLLATE_CONFLICT, COLLATE_EXPLICIT, COLLATE_IMPLICIT, COLLATE_NONE, context, ereport, errcode(), errmsg(), ERROR, get_collation_name(), and parser_errposition().
Referenced by assign_collations_walker(), and assign_hypothetical_collations().
Oid select_common_collation | ( | ParseState * | pstate, |
List * | exprs, | ||
bool | none_ok | ||
) |
Definition at line 208 of file parse_collate.c.
References assign_collations_walker(), COLLATE_CONFLICT, COLLATE_NONE, context, ereport, errcode(), errhint(), errmsg(), ERROR, get_collation_name(), InvalidOid, and parser_errposition().
Referenced by analyzeCTE(), assign_collations_walker(), transformSetOperationTree(), and transformValuesClause().