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);
406 (
void *) &loccontext);
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."),
490 (
void *) &loccontext);
531 (
void *) &loccontext);
651 foreach(lc, expr->
args)
681 (
void *) &loccontext);
707 collation = typcollation;
784 else if (strength == context->
strength)
833 (
errcode(ERRCODE_COLLATION_MISMATCH),
834 errmsg(
"collation mismatch between explicit collations \"%s\" and \"%s\"",
869 foreach(lc, aggref->
args)
902 bool merge_sort_collations;
914 foreach(lc, aggref->
args)
919 if (merge_sort_collations)
941 bool merge_sort_collations;
951 while (extra_args-- > 0)
954 h_cell =
lnext(h_cell);
958 while (h_cell && s_cell)
985 (
errcode(ERRCODE_COLLATION_MISMATCH),
986 errmsg(
"collation mismatch between implicit collations \"%s\" and \"%s\"",
989 errhint(
"You can choose the collation by applying the COLLATE clause to one or both expressions."),
1027 if (merge_sort_collations)
1035 h_cell =
lnext(h_cell);
1036 s_cell =
lnext(s_cell);
#define list_make2(x1, x2)
bool query_tree_walker(Query *query, bool(*walker)(), void *context, int flags)
#define IsA(nodeptr, _type_)
int errhint(const char *fmt,...)
#define forboth(cell1, list1, cell2, list2)
int exprLocation(const Node *expr)
int32 exprTypmod(const Node *expr)
char * get_collation_name(Oid colloid)
int errcode(int sqlerrcode)
List * lappend_oid(List *list, Oid datum)
#define OidIsValid(objectId)
#define QTW_IGNORE_CTE_SUBQUERIES
void assign_expr_collations(ParseState *pstate, Node *expr)
static bool assign_query_collations_walker(Node *node, ParseState *pstate)
void assign_list_collations(ParseState *pstate, List *exprs)
Oid get_func_variadictype(Oid funcid)
RelabelType * makeRelabelType(Expr *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat)
#define DEFAULT_COLLATION_OID
Oid select_common_collation(ParseState *pstate, List *exprs, bool none_ok)
static ListCell * list_head(const List *l)
#define ereport(elevel, rest)
void exprSetInputCollation(Node *expr, Oid inputcollation)
static void assign_aggregate_collations(Aggref *aggref, assign_collations_context *loccontext)
Oid get_typcollation(Oid typid)
#define Assert(condition)
static void assign_ordered_set_collations(Aggref *aggref, assign_collations_context *loccontext)
static void assign_hypothetical_collations(Aggref *aggref, assign_collations_context *loccontext)
Oid exprType(const Node *expr)
bool expression_tree_walker(Node *node, bool(*walker)(), void *context)
static int list_length(const List *l)
int parser_errposition(ParseState *pstate, int location)
Oid exprCollation(const Node *expr)
void exprSetCollation(Node *expr, Oid collation)
int errmsg(const char *fmt,...)
void assign_query_collations(ParseState *pstate, Query *query)
#define QTW_IGNORE_RANGE_TABLE
static bool assign_collations_walker(Node *node, assign_collations_context *context)
#define AGGKIND_HYPOTHETICAL
static void merge_collation_state(Oid collation, CollateStrength strength, int location, Oid collation2, int location2, assign_collations_context *context)
#define AGGKIND_ORDERED_SET