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

Reply via email to