pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
extension dependencies with 'requires'
3+ messages / 2 participants
[nested] [flat]

* extension dependencies with 'requires'
@ 2018-05-01 17:34  Eric Hanson <eric@aquameta.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Eric Hanson @ 2018-05-01 17:34 UTC (permalink / raw)
  To: PostgreSQL General <pgsql-general@lists.postgresql.org>

Greetings,

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?  How does the
extension know where to install its dependencies?

Thanks,
Eric
--
Eric Hanson
CEO, Aquameta Labs
503-929-1073
www.aquameta.com

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: extension dependencies with 'requires'
@ 2018-05-01 18:00  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Eric Hanson <eric@aquameta.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-05-01 18:00 UTC (permalink / raw)
  To: Eric Hanson <eric@aquameta.com>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: extension dependencies with 'requires'
@ 2018-05-01 18:06  Eric Hanson <eric@aquameta.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Eric Hanson @ 2018-05-01 18:06 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>

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
www.aquameta.com


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
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-05-01 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 17:34 extension dependencies with 'requires' Eric Hanson <eric@aquameta.com>
2018-05-01 18:00 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-05-01 18:06   ` Eric Hanson <eric@aquameta.com>

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