Re: Prevent extension creation in temporary schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sergei Kornilov <sk(at)zsrv(dot)org>
Cc: "Kuroda, Hayato" <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Chris Travers <chris(dot)travers(at)adjust(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "dimitri(at)citusdata(dot)com" <dimitri(at)citusdata(dot)com>
Subject: Re: Prevent extension creation in temporary schemas
Date: 2019-02-28 15:13:17
Message-ID: 7958.1551366797@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sergei Kornilov <sk(at)zsrv(dot)org> writes:
>> test=> CREATE EXTENSION file_fdw WITH SCHEMA pg_temp_3;
>> ERROR: function file_fdw_handler() does not exist

> This behavior seems as not related to extensions infrastructure:

Yeah, I think it's just because we won't search the pg_temp schema
for function or operator names, unless the calling SQL command
explicitly writes "pg_temp.foo(...)" or equivalent. That's an
ancient security decision, which we're unlikely to undo. It
certainly puts a crimp in the usefulness of putting extensions into
pg_temp, but I don't think it totally destroys the usefulness.
You could still use an extension to package, say, the definitions
of a bunch of temp tables and views that you need to create often.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2019-02-28 15:13:36 Re: [HACKERS] Incomplete startup packet errors
Previous Message Tom Lane 2019-02-28 15:09:05 Re: Drop type "smgr"?