Re: Upgrading pg_statistic to handle collation honestly

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Upgrading pg_statistic to handle collation honestly
Дата
Msg-id 6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com
обсуждение исходный текст
Ответ на Upgrading pg_statistic to handle collation honestly  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Upgrading pg_statistic to handle collation honestly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 12/12/2018 16:57, Tom Lane wrote:
> Attached is a draft patch for same.  It adds storage to pg_statistic
> to record the collation of each statistics "slot".  A plausible
> alternative design would be to just say "look at the collation of the
> underlying column", but that would require extra catcache lookups in
> the selectivity functions that need the info.

That looks like a good approach to me.

> Doing it like this also
> makes it theoretically feasible to track stats computed with respect
> to different collations for the same column, though I'm not really
> convinced that we'd ever do that.

It's a good option to keep around.  Maybe someday extended statistics
could be used to ask for additional statistics to be collected.

> * Probably this conflicts to some extent with Peter's "Reorganize
> collation lookup" patch, but I haven't studied that yet.

I've looked it over, and it's nothing that can't be easily fixed up.  In
fact, it simplifies a few things, so I'm in favor of moving your patch
along first.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Surafel Temesgen
Дата:
Сообщение: Re: COPY FROM WHEN condition
Следующее
От: Simon Riggs
Дата:
Сообщение: Row Visibility and Table Access Methods