Can someone explain to me what the purpose of the CURRENT_SCHEMA() function? It seems like it always returns the first schema in the search path that is listed after the "$user" schema...
For example:
Code: Select all
usli06=> SHOW search_path;
name | setting
-------------+---------------------------------------------------
search_path | "$user", public, v_catalog, v_monitor, v_internal
(1 row)
usli06=> SELECT current_schema();
current_schema
----------------
public
(1 row)
Code: Select all
usli06=> SET search_path = "$user", vertica_wh, public, v_catalog, v_monitor, v_internal;
SET
usli06=> SHOW search_path;
name | setting
-------------+-----------------------------------------------------------------
search_path | "$user", vertica_wh, public, v_catalog, v_monitor, v_internal
(1 row)
usli06=> SELECT current_schema();
current_schema
----------------
vertica_wh
(1 row)