mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +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:
@@ -227,7 +227,7 @@ win32_langinfo(const char *ctype)
|
||||
* with any desired encoding.
|
||||
*/
|
||||
int
|
||||
pg_get_encoding_from_locale(const char *ctype)
|
||||
pg_get_encoding_from_locale(const char *ctype, bool write_message)
|
||||
{
|
||||
char *sys;
|
||||
int i;
|
||||
@@ -322,17 +322,20 @@ pg_get_encoding_from_locale(const char *ctype)
|
||||
* We print a warning if we got a CODESET string but couldn't recognize
|
||||
* it. This means we need another entry in the table.
|
||||
*/
|
||||
if (write_message)
|
||||
{
|
||||
#ifdef FRONTEND
|
||||
fprintf(stderr, _("could not determine encoding for locale \"%s\": codeset is \"%s\""),
|
||||
ctype, sys);
|
||||
/* keep newline separate so there's only one translatable string */
|
||||
fputc('\n', stderr);
|
||||
fprintf(stderr, _("could not determine encoding for locale \"%s\": codeset is \"%s\""),
|
||||
ctype, sys);
|
||||
/* keep newline separate so there's only one translatable string */
|
||||
fputc('\n', stderr);
|
||||
#else
|
||||
ereport(WARNING,
|
||||
(errmsg("could not determine encoding for locale \"%s\": codeset is \"%s\"",
|
||||
ctype, sys),
|
||||
errdetail("Please report this to <pgsql-bugs@postgresql.org>.")));
|
||||
ereport(WARNING,
|
||||
(errmsg("could not determine encoding for locale \"%s\": codeset is \"%s\"",
|
||||
ctype, sys),
|
||||
errdetail("Please report this to <pgsql-bugs@postgresql.org>.")));
|
||||
#endif
|
||||
}
|
||||
|
||||
free(sys);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user