227 (
errcode(ERRCODE_COLLATION_MISMATCH),
228 errmsg(
"collation mismatch between implicit collations \"%s\" and \"%s\"",
231 errhint(
"You can choose the collation by applying the COLLATE clause to one or both expressions."),
298 (
void *) &loccontext);
320 (
void *) &loccontext);
326 collation = expr->resultcollid;
357 case T_RowCompareExpr:
381 expr->inputcollids = colls;
390 case T_CoerceToDomain:
406 (
void *) &loccontext);
411 if (typcollation == DEFAULT_COLLATION_OID)
421 collation = typcollation;
447 (
void *) &loccontext);
474 (
errcode(ERRCODE_COLLATION_MISMATCH),
475 errmsg(
"collation mismatch between implicit collations \"%s\" and \"%s\"",
478 errhint(
"You can choose the collation by applying the COLLATE clause to one or both expressions."),
482 case T_InferenceElem:
486 case T_OnConflictExpr:
487 case T_SortGroupClause:
491 (
void *) &loccontext);
531 (
void *) &loccontext);
545 case T_CoerceToDomainValue:
548 case T_CurrentOfExpr:
600 switch (aggref->aggkind)
606 case AGGKIND_ORDERED_SET:
610 case AGGKIND_HYPOTHETICAL:
616 (
int) aggref->aggkind);
651 foreach(lc, expr->
args)
671 case T_SubscriptingRef:
702 (
void *) &loccontext);
728 collation = typcollation;
792 if (strength >
context->strength)
795 context->collation = collation;
801 context->collation2 = collation2;
802 context->location2 = location2;
805 else if (strength ==
context->strength)
814 if (collation !=
context->collation)
819 if (
context->collation == DEFAULT_COLLATION_OID)
822 context->collation = collation;
826 else if (collation != DEFAULT_COLLATION_OID)
836 context->collation2 = collation;
845 if (collation !=
context->collation)
854 (
errcode(ERRCODE_COLLATION_MISMATCH),
855 errmsg(
"collation mismatch between explicit collations \"%s\" and \"%s\"",
890 foreach(lc, aggref->
args)
922 bool merge_sort_collations;
934 foreach(lc, aggref->
args)
938 if (merge_sort_collations)
960 bool merge_sort_collations;
970 while (extra_args-- > 0)
977 while (h_cell && s_cell)
1004 (
errcode(ERRCODE_COLLATION_MISMATCH),
1005 errmsg(
"collation mismatch between implicit collations \"%s\" and \"%s\"",
1008 errhint(
"You can choose the collation by applying the COLLATE clause to one or both expressions."),
1046 if (merge_sort_collations)
1057 Assert(h_cell == NULL && s_cell == NULL);
#define Assert(condition)
#define OidIsValid(objectId)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
List * lappend_oid(List *list, Oid datum)
Oid get_func_variadictype(Oid funcid)
Oid get_typcollation(Oid typid)
char * get_collation_name(Oid colloid)
RelabelType * makeRelabelType(Expr *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat)
Oid exprType(const Node *expr)
void exprSetCollation(Node *expr, Oid collation)
int32 exprTypmod(const Node *expr)
Oid exprCollation(const Node *expr)
void exprSetInputCollation(Node *expr, Oid inputcollation)
int exprLocation(const Node *expr)
#define QTW_IGNORE_CTE_SUBQUERIES
#define query_tree_walker(q, w, c, f)
#define expression_tree_walker(n, w, c)
#define QTW_IGNORE_RANGE_TABLE
#define IsA(nodeptr, _type_)
void assign_list_collations(ParseState *pstate, List *exprs)
Oid select_common_collation(ParseState *pstate, List *exprs, bool none_ok)
static bool assign_collations_walker(Node *node, assign_collations_context *context)
static void assign_aggregate_collations(Aggref *aggref, assign_collations_context *loccontext)
static bool assign_query_collations_walker(Node *node, ParseState *pstate)
void assign_query_collations(ParseState *pstate, Query *query)
static void merge_collation_state(Oid collation, CollateStrength strength, int location, Oid collation2, int location2, assign_collations_context *context)
static void assign_ordered_set_collations(Aggref *aggref, assign_collations_context *loccontext)
void assign_expr_collations(ParseState *pstate, Node *expr)
static void assign_hypothetical_collations(Aggref *aggref, assign_collations_context *loccontext)
int parser_errposition(ParseState *pstate, int location)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
#define forboth(cell1, list1, cell2, list2)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
#define list_make2(x1, x2)