Re: erroneous restore into pg_catalog schema - Mailing list pgsql-hackers

From Tom Lane
Subject Re: erroneous restore into pg_catalog schema
Date
Msg-id 14601.1367851053@sss.pgh.pa.us
Whole thread Raw
In response to Re: erroneous restore into pg_catalog schema  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: erroneous restore into pg_catalog schema
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> it seems like the extensions code should test for and reject an attempt
>> to set a relocatable extension's schema to pg_catalog.  Otherwise you'd
>> be likely to get not-too-intelligible errors from the extension script.

> Reading the code now, it seems to me that we lack a more general test
> and error situation to match with the comments.

>     else if (control->schema != NULL)
>     {
>         /*
>          * The extension is not relocatable and the author gave us a schema
>          * for it.    We create the schema here if it does not already exist.
>          */

> We should probably error out when entering in that block of code if the
> extension is relocatable at all, right? That would fix the pg_catalog
> case as well as the general one.

Huh?  According to the comment, at least, we don't get here for a
relocatable extension.  I don't see anything wrong with auto-creating
the target schema for a non-relocatable extension.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Commit subject line
Next
From: 'Bruce Momjian'
Date:
Subject: Re: 9.3 Beta1 status report