static List *resolve_unique_index_expr(ParseState *pstate, InferClause *infer,
Relation heapRel);
static List *addTargetToGroupList(ParseState *pstate, TargetEntry *tle,
- List *grouplist, List *targetlist, int location,
- bool resolveUnknown);
+ List *grouplist, List *targetlist, int location);
static WindowClause *findWindowClause(List *wclist, const char *name);
static Node *transformFrameOffset(ParseState *pstate, int frameOptions,
Node *clause);
if (!found)
*flatresult = addTargetToGroupList(pstate, tle,
*flatresult, *targetlist,
- exprLocation(gexpr),
- true);
+ exprLocation(gexpr));
/*
* _something_ must have assigned us a sortgroupref by now...
List *orderlist,
List **targetlist,
ParseExprKind exprKind,
- bool resolveUnknown,
bool useSQL99)
{
List *sortlist = NIL;
targetlist, exprKind);
sortlist = addTargetToSortList(pstate, tle,
- sortlist, *targetlist, sortby,
- resolveUnknown);
+ sortlist, *targetlist, sortby);
}
return sortlist;
windef->orderClause,
targetlist,
EXPR_KIND_WINDOW_ORDER,
- true /* fix unknowns */ ,
true /* force SQL99 rules */ );
partitionClause = transformGroupClause(pstate,
windef->partitionClause,
continue; /* ignore junk */
result = addTargetToGroupList(pstate, tle,
result, *targetlist,
- exprLocation((Node *) tle->expr),
- true);
+ exprLocation((Node *) tle->expr));
}
/*
parser_errposition(pstate, exprLocation(dexpr))));
result = addTargetToGroupList(pstate, tle,
result, *targetlist,
- exprLocation(dexpr),
- true);
+ exprLocation(dexpr));
}
/*
* list, add it to the end of the list, using the given sort ordering
* info.
*
- * If resolveUnknown is TRUE, convert TLEs of type UNKNOWN to TEXT. If not,
- * do nothing (which implies the search for a sort operator will fail).
- * pstate should be provided if resolveUnknown is TRUE, but can be NULL
- * otherwise.
- *
* Returns the updated SortGroupClause list.
*/
List *
addTargetToSortList(ParseState *pstate, TargetEntry *tle,
- List *sortlist, List *targetlist, SortBy *sortby,
- bool resolveUnknown)
+ List *sortlist, List *targetlist, SortBy *sortby)
{
Oid restype = exprType((Node *) tle->expr);
Oid sortop;
ParseCallbackState pcbstate;
/* if tlist item is an UNKNOWN literal, change it to TEXT */
- if (restype == UNKNOWNOID && resolveUnknown)
+ if (restype == UNKNOWNOID)
{
tle->expr = (Expr *) coerce_type(pstate, (Node *) tle->expr,
restype, TEXTOID, -1,
* to a SELECT item that matches the GROUP BY item; it'd be pretty confusing
* to report such a location.
*
- * If resolveUnknown is TRUE, convert TLEs of type UNKNOWN to TEXT. If not,
- * do nothing (which implies the search for an equality operator will fail).
- * pstate should be provided if resolveUnknown is TRUE, but can be NULL
- * otherwise.
- *
* Returns the updated SortGroupClause list.
*/
static List *
addTargetToGroupList(ParseState *pstate, TargetEntry *tle,
- List *grouplist, List *targetlist, int location,
- bool resolveUnknown)
+ List *grouplist, List *targetlist, int location)
{
Oid restype = exprType((Node *) tle->expr);
/* if tlist item is an UNKNOWN literal, change it to TEXT */
- if (restype == UNKNOWNOID && resolveUnknown)
+ if (restype == UNKNOWNOID)
{
tle->expr = (Expr *) coerce_type(pstate, (Node *) tle->expr,
restype, TEXTOID, -1,
ParseExprKind exprKind, bool useSQL99);
extern List *transformSortClause(ParseState *pstate, List *orderlist,
List **targetlist, ParseExprKind exprKind,
- bool resolveUnknown, bool useSQL99);
+ bool useSQL99);
extern List *transformWindowDefinitions(ParseState *pstate,
List *windowdefs,
Oid *constraint);
extern List *addTargetToSortList(ParseState *pstate, TargetEntry *tle,
- List *sortlist, List *targetlist, SortBy *sortby,
- bool resolveUnknown);
+ List *sortlist, List *targetlist, SortBy *sortby);
extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);