Re: Reorganize collation lookup time and place - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Reorganize collation lookup time and place
Date
Msg-id e22f7e52-69c8-7f03-4193-0ddf5545d9ea@2ndquadrant.com
Whole thread Raw
In response to Re: Reorganize collation lookup time and place  (Andres Freund <andres@anarazel.de>)
Responses Re: Reorganize collation lookup time and place
List 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


pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: 'infinity'::Interval should be added
Next
From: Tom Lane
Date:
Subject: Re: alternative to PG_CATCH