Re: Reorganize collation lookup time and place

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reorganize collation lookup time and place
Date: 2018-12-13 14:05:40
Message-ID: e22f7e52-69c8-7f03-4193-0ddf5545d9ea@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/12/2018 18:56, Andres Freund wrote:
>> This makes the collation lookup more similar to the function lookup. In
>> many cases they now happen right next to each other.
>> pg_newlocale_from_collation() becomes analogous to fmgr_info() and
>> pg_locale_t to FmgrInfo *.
> Why isn't this integrated into fmgr_info()?

fmgr_info() looks up stuff in pg_proc. pg_newlocale_...() looks up
stuff in pg_collation. There is no overlap between them.

There is also not necessarily a one-to-one correspondence between
function and collation lookup calls. For example, in some cases you
need to look up a sorting and a hashing functions, but only one
collation for both.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-13 15:01:37 Re: alternative to PG_CATCH
Previous Message Chapman Flack 2018-12-13 13:56:26 Re: 'infinity'::Interval should be added