Re: Set COLLATE on a session level

Поиск
Список
Период
Сортировка
От Alexandre GRAIL
Тема Re: Set COLLATE on a session level
Дата
Msg-id 6c0e85fb-faad-7209-94b5-ca25c5b3002d@augure-ng.fr
обсуждение исходный текст
Ответ на Re: Set COLLATE on a session level  (Dirk Mika <Dirk.Mika@mikatiming.de>)
Список pgsql-general
On 10/12/2020 19:33, Dirk Mika wrote:
>>>> There is a SET COLLATION command in the SQL standard that does this.
>>>> Someone just has to implement it.  It wouldn't be terribly difficult, I
>>>> think.
>>>
>> I think it would be analogous to the schema search path.
> Usually you notice right away if the "search_path" is wrong, because
> relations won't be found.
>
> But with a bad collation set in a session, the problems would be more
> subtle. For example, if someone asks you why an index isn't used to
> support sorting, you'd always have to remember to ask what collation
> has been set in the session.

If that information appear in the explain output, you won’'t have to ask.

For people working in multilingual environment, a collation setting 
within session absolutely makes sense. So you don’t have to specify the 
same setting at each and every query. Also, the expected ordering do 
depends on the user who do the query (and his expectation from the 
language he’s working in) and *not* the data itself.

Regards








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

Предыдущее
От: Atul Kumar
Дата:
Сообщение: "Required checkpoints occurs too frequently"
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Set COLLATE on a session level