Re: Search path & functions in temporary schemas - Mailing list pgsql-general

From Tom Lane
Subject Re: Search path & functions in temporary schemas
Date
Msg-id 19174.1544545649@sss.pgh.pa.us
Whole thread Raw
In response to Search path & functions in temporary schemas  (jose luis pillado <josel.pillado@gmail.com>)
List pgsql-general
jose luis pillado <josel.pillado@gmail.com> writes:
> This solution worked with a real schema, but it did not with a temporary
> one. ...
> Is there any way to make this work?

The temp schema is intentionally excluded from the search path for
functions and operators, because otherwise it's just too easy to
trojan-horse things.  If you really want to create and call a
temp function, you have to schema-qualify its name when you call it.

To make that a bit less messy, you can use "pg_temp" as an alias
for your session's temp schema, rather than having to find out which
numbered temp schema you're really using.

            regards, tom lane


pgsql-general by date:

Previous
From: ramsiddu007
Date:
Subject: Re: Newly Created Source DB Table Not Reflecting into DestinationForeign Tables
Next
From: Mike Lissner
Date:
Subject: Re: Errors with schema migration and logical replication — expected?