1
0
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:
Peter Eisentraut
2011-02-08 23:04:18 +02:00
parent 1703f0e8da
commit 414c5a2ea6
156 changed files with 4519 additions and 582 deletions

View File

@@ -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;