Skip to content

Commit

Permalink
Remove changes for DISTINCT case
Browse files Browse the repository at this point in the history
Signed-off-by: Walt Boettge <[email protected]>
  • Loading branch information
wboettge committed Aug 9, 2023
1 parent 8d33c55 commit 3219473
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/backend/parser/parse_clause.c
Original file line number Diff line number Diff line change
Expand Up @@ -3433,22 +3433,14 @@ addTargetToGroupList(ParseState *pstate, TargetEntry *tle,
Oid restype = exprType((Node *) tle->expr);

/* if tlist item is an UNKNOWN literal, change it to TEXT */
if (restype == UNKNOWNOID && sql_dialect != SQL_DIALECT_TSQL)
if (restype == UNKNOWNOID)
{
tle->expr = (Expr *) coerce_type(pstate, (Node *) tle->expr,
restype, TEXTOID, -1,
COERCION_IMPLICIT,
COERCE_IMPLICIT_CAST,
-1);
restype = TEXTOID;
} else if (restype == UNKNOWNOID && sql_dialect == SQL_DIALECT_TSQL)
{
tle->expr = (Expr *) coerce_type(pstate, (Node *) tle->expr,
restype, INT4OID, -1,
COERCION_IMPLICIT,
COERCE_IMPLICIT_CAST,
-1);
restype = INT4OID;
}

/* avoid making duplicate grouplist entries */
Expand Down

0 comments on commit 3219473

Please sign in to comment.