Hi, On 2018-12-10 16:12:54 +0100, Peter Eisentraut wrote: > Attached is a patch that reorganizes how and where collations are looked up. > > Until now, a fmgr C function that makes use of collation information > (for example varstr_cmp(), str_toupper()) gets passed the collation OID, > looks up the collation with pg_newlocale_from_collation(), and then does > something with it. > > With this change, the lookup is moved earlier, typically during executor > initialization. The fmgr functions receive the locale pointer that is > the result of that lookup. > > 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()? Greetings, Andres Freund