Re: extension dependencies with 'requires' - Mailing list pgsql-general

From Eric Hanson
Subject Re: extension dependencies with 'requires'
Date
Msg-id CACA6kxiwRHsKOa+QmJu3yLU3W-6bY-v3HHB7ncsVdjOujFVwpQ@mail.gmail.com
Whole thread Raw
In response to Re: extension dependencies with 'requires'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Ok thanks.  

FWIW, this pretty profoundly limits what you can do with dependencies in extensions that define their own schema:  When two extensions that both define their own schema need to share the same dependency, sounds like that is impossible, because the dependency extensions can't be installed in two schemas at the same time.  Which ever extension is installed first will create the dep in the target schema, and then the second extension will try to install the dep and fail due to it being already installed.

Thanks,
Eric

--
Eric Hanson
CEO, Aquameta Labs
503-929-1073


On Tue, May 1, 2018 at 11:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Eric Hanson <eric@aquameta.com> writes:
> I'm trying to author an extension and running into troubles with
> dependencies.  The extension depends on the uuid-ossp, pgcrypto and
> postgres_fdw extensions, but I would like the dependencies to be installed
> in the public schema, though the extension itself lives in its own schema.
> Is there a way to use CREATE EXTENSION ... CASCADE and specify in the
> control file which schema the dependencies are installed in?

Afraid not.  CASCADE will pass down the same target-schema option to the
child CREATE EXTENSION operations that appeared in the initial command.

                        regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: extension dependencies with 'requires'
Next
From: Alastair McKinley
Date:
Subject: Index/trigger implementation for accessing latest records