Hi all,
I notice slightly different handling of the implicit search_path for
temporary tables and temporary functions. Consider:
(with a default search path):
# SHOW search_path;
search_path
----------------
"$user",public
(1 row)
BEGIN;
CREATE TABLE pg_temp.bar();
CREATE FUNCTION pg_temp.foofunc() RETURNS int AS $$
SELECT 1;
$$ LANGUAGE SQL;
SELECT * FROM bar;
SELECT * FROM foofunc();
COMMIT;
The select from temporary table bar above succeeds, but I get:
ERROR: function foofunc() does not exist
if I don't schema-qualify the function as pg_temp.foofunc(). So,
pg_temp is being implicitly included in the default search path when
looking for tables, but not for functions. Is there a reason for this
difference?
Josh