Re: [HACKERS] Varying results when using merge joins overpostgres_fdw vs hash joins

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: [HACKERS] Varying results when using merge joins overpostgres_fdw vs hash joins
Дата
Msg-id CADkLM=cZC5hdANm5OTgUvDAX3y7GASTt61qxsYxKA7FGAXx4Fw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Varying results when using merge joins overpostgres_fdw vs hash joins  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Ответы Re: [HACKERS] Varying results when using merge joins over postgres_fdw vs hash joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

The collation column is empty here, which means that collation for
str* columns is default collation i.e. C. This isn't true, since the
default ncollation on the foreign server is different from the default
collation of local database. AFAIU, import foreign schema should have
set appropriate collation of the foreign table.

That's what we saw. The query inside IMPORT FOREIGN SCHEMA assumes a NULL collation means default, without asking the server what that default is. I was thinking that we could change the select inside postgresImportForeignSchema and replace
collname,
with something borrowed from information_schema.sql like

        coalesce(collname, (SELECT encoding FROM pg_catalog.pg_database WHERE datname = pg_catalog.current_database())) 

which itself isn't right because encoding names don't match up perfectly with collation names. 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] src/test/subscription/t/005_encoding.pl is broken
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Varying results when using merge joins overpostgres_fdw vs hash joins