Re: Changes to pg_dump/psql following collation "C" in the catalog

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Changes to pg_dump/psql following collation "C" in the catalog
Дата
Msg-id 1247dcf3-f3bd-4047-9a0a-6a047377db84@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Changes to pg_dump/psql following collation "C" in the catalog  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
    Chapman Flack wrote:

> >> "Daniel Verite" <daniel@manitou-mail.org> writes:
> >>> One consequence of using the "C" collation in the catalog versus
> >>> the db collation
>
> As an intrigued Person Following At Home, I was happy when I found
> this little three-message thread had more context in [1] and [2]. :)
>
> -Chap
>
> [1] https://postgr.es/m/15938.1544377821@sss.pgh.pa.us
> [2] https://postgr.es/m/5978.1544030694@sss.pgh.pa.us

Yes. The concrete issue that the patch addresses can be illustrated
with this example:

  psql (12devel)
  Type "help" for help.

  postgres=# show lc_collate ;
   lc_collate
  -------------
   fr_FR.UTF-8
  (1 row)

  postgres=# create table année_2018();
  CREATE TABLE

  postgres=# \dt '\\w+_\\d+'
  psql: error: Did not find any relation named "\w+_\d+".

In previous versions it would have found the table with the accent
in the name. With 12devel it doesn't, because the match is done with
the collation of the column, now "C", which does not consider the
accented character to be a letter.
This also affects pg_dump with the -t and -n switches that
accept patterns and I think pretty much all \d* commands
that accept patterns too.

The purpose of the fix is for the patterns to give the same results as
before. It's done by simply adding explicit collate clauses to use the
collation of the database for these comparisons.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



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

Предыдущее
От: Surafel Temesgen
Дата:
Сообщение: Re: FETCH FIRST clause PERCENT option
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCH v20] GSSAPI encryption support