Re: Set COLLATE on a session level

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Set COLLATE on a session level
Дата
Msg-id 2156565.1607098719@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Set COLLATE on a session level  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Set COLLATE on a session level
Список pgsql-general
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 2020-11-20 08:13, Dirk Mika wrote:
>> I know that I can specify a COLLATE for a SELECT statement in the ORDER BY Clause, but then I would have to adjust
thestatements in the client and statements that are automatically generated by the database components used, would not
beaffected. 

> 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.

[ squint... ]  Just because it's in the standard doesn't mean it's a
good idea.  It sounds like this is morally equivalent to a GUC that
changes query semantics.  We have learned painfully that such behaviors
are best avoided, because they break things you didn't expect to break.

(I also wonder just exactly what such a setting would do, and how it
interacts with the existing rules for deriving collations within a
query.  Does parse_collate.c go out the window the minute somebody
sets a non-empty collation setting?)

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Accessing Postgres Server and database from other Machine
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Alter the column data type of the large data volume table.