From: Tom Lane <tgl@sss.pgh.pa.us>
To: jose luis pillado <josel.pillado@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Search path & functions in temporary schemas
Date: Tue, 11 Dec 2018 11:27:29 -0500
Message-ID: <19174.1544545649@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHmzsaFuuNH4CRadFtHmSuMV+MdV=4a0-PMN3FA9EdRj09gGGg@mail.gmail.com>
References: <CAHmzsaFuuNH4CRadFtHmSuMV+MdV=4a0-PMN3FA9EdRj09gGGg@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, josel.pillado@gmail.com
Subject: Re: Search path & functions in temporary schemas
In-Reply-To: <19174.1544545649@sss.pgh.pa.us>
References: <CAHmzsaFuuNH4CRadFtHmSuMV+MdV=4a0-PMN3FA9EdRj09gGGg@mail.gmail.com> <19174.1544545649@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox