Re: how is text-equality handled in postgresql?

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Re: how is text-equality handled in postgresql?
Дата
Msg-id lb5oh2$77f$1@ger.gmane.org
обсуждение исходный текст
Ответ на how is text-equality handled in postgresql?  (Gábor Farkas <gabor.farkas@gmail.com>)
Ответы Re: how is text-equality handled in postgresql?
Список pgsql-general
On 15/01/2014 10:10, Gábor Farkas wrote:
> hi,
>
> when i create an unique-constraint on a varchar field, how exactly
> does postgresql compare the texts? i'm asking because in UNICODE there
> are a lot of complexities about this..
>
> or in other words, when are two varchars equal in postgres? when their
> bytes are? or some algorithm is applied?

By default, it is "whatever the operating system thinks it's right".
PostgreSQL doesn't have its own collation code, it uses the OS's locale
support for this.

(which breaks on certain systems which don't have complete UTF-8 support
- I'm in favour of importing ICU at least as an optional dependancy,
similar to what the FreeBSD's patch does:
http://people.freebsd.org/~girgen/postgresql-icu/).


Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Gábor Farkas
Дата:
Сообщение: how is text-equality handled in postgresql?
Следующее
От: Sameer Kumar
Дата:
Сообщение: Re: pg_basebackup failing