mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Per-column collation support
This adds collation support for columns and domains, a COLLATE clause to override it per expression, and B-tree index support. Peter Eisentraut reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
This commit is contained in:
@ -937,11 +937,15 @@ ExecTypeFromTLInternal(List *targetList, bool hasoid, bool skipjunk)
|
||||
if (skipjunk && tle->resjunk)
|
||||
continue;
|
||||
TupleDescInitEntry(typeInfo,
|
||||
cur_resno++,
|
||||
cur_resno,
|
||||
tle->resname,
|
||||
exprType((Node *) tle->expr),
|
||||
exprTypmod((Node *) tle->expr),
|
||||
0);
|
||||
TupleDescInitEntryCollation(typeInfo,
|
||||
cur_resno,
|
||||
exprCollation((Node *) tle->expr));
|
||||
cur_resno++;
|
||||
}
|
||||
|
||||
return typeInfo;
|
||||
@ -969,11 +973,15 @@ ExecTypeFromExprList(List *exprList)
|
||||
sprintf(fldname, "f%d", cur_resno);
|
||||
|
||||
TupleDescInitEntry(typeInfo,
|
||||
cur_resno++,
|
||||
cur_resno,
|
||||
fldname,
|
||||
exprType(e),
|
||||
exprTypmod(e),
|
||||
0);
|
||||
TupleDescInitEntryCollation(typeInfo,
|
||||
cur_resno,
|
||||
exprCollation(e));
|
||||
cur_resno++;
|
||||
}
|
||||
|
||||
return typeInfo;
|
||||
|
Reference in New Issue
Block a user