mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -47,7 +47,8 @@ lower(PG_FUNCTION_ARGS)
|
||||
text *result;
|
||||
|
||||
out_string = str_tolower(VARDATA_ANY(in_string),
|
||||
VARSIZE_ANY_EXHDR(in_string));
|
||||
VARSIZE_ANY_EXHDR(in_string),
|
||||
PG_GET_COLLATION());
|
||||
result = cstring_to_text(out_string);
|
||||
pfree(out_string);
|
||||
|
||||
@@ -77,7 +78,8 @@ upper(PG_FUNCTION_ARGS)
|
||||
text *result;
|
||||
|
||||
out_string = str_toupper(VARDATA_ANY(in_string),
|
||||
VARSIZE_ANY_EXHDR(in_string));
|
||||
VARSIZE_ANY_EXHDR(in_string),
|
||||
PG_GET_COLLATION());
|
||||
result = cstring_to_text(out_string);
|
||||
pfree(out_string);
|
||||
|
||||
@@ -110,7 +112,8 @@ initcap(PG_FUNCTION_ARGS)
|
||||
text *result;
|
||||
|
||||
out_string = str_initcap(VARDATA_ANY(in_string),
|
||||
VARSIZE_ANY_EXHDR(in_string));
|
||||
VARSIZE_ANY_EXHDR(in_string),
|
||||
PG_GET_COLLATION());
|
||||
result = cstring_to_text(out_string);
|
||||
pfree(out_string);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user