pg_temp is an alias for current session's temporary-table schema.
Likewise, the current session's temporary-table schema,
pg_temp_nnn, is always searched if it exists. It can be explicitly listed in the path by using the aliaspg_temp.https://www.postgresql.org/docs/current/runtime-config-client.html#id-1.6.7.14.2.2.2.1.4
How does PostgreSQL resolve the pg_temp alias to the actual temporary-table schema? Or, if that's not accessible by the user, what's the easiest way to resolve it as a user?
(NB My guess would be that PostgreSQL does not resolve it via pg_my_temp_schema(), because pg_temp already existed in PostgreSQL 8.0, but pg_my_temp_schema() was added in PostgreSQL 8.2.)