pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add CASCADE support for CREATE EXTENSION.
6+ messages / 4 participants
[nested] [flat]
* pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-03 16:48 Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 6+ messages in thread
From: Andres Freund @ 2015-10-03 16:48 UTC (permalink / raw)
To: pgsql-committers
Add CASCADE support for CREATE EXTENSION.
Without CASCADE, if an extension has an unfullfilled dependency on
another extension, CREATE EXTENSION ERRORs out with "required extension
... is not installed". That is annoying, especially when that dependency
is an implementation detail of the extension, rather than something the
extension's user can make sense of.
In addition to CASCADE this also includes a small set of regression
tests around CREATE EXTENSION.
Author: Petr Jelinek, editorialized by Michael Paquier, Andres Freund
Reviewed-By: Michael Paquier, Andres Freund, Jeff Janes
Discussion: 557E0520.3040800@2ndquadrant.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/b67aaf21e8ef8273d5179a8832a109153d7adfe1
Modified Files
--------------
contrib/hstore_plperl/expected/hstore_plperl.out | 6 +-
contrib/hstore_plperl/expected/hstore_plperlu.out | 6 +-
contrib/hstore_plperl/sql/hstore_plperl.sql | 4 +-
contrib/hstore_plperl/sql/hstore_plperlu.sql | 4 +-
.../hstore_plpython/expected/hstore_plpython.out | 4 +-
contrib/hstore_plpython/sql/hstore_plpython.sql | 3 +-
contrib/ltree_plpython/expected/ltree_plpython.out | 4 +-
contrib/ltree_plpython/sql/ltree_plpython.sql | 3 +-
doc/src/sgml/ref/create_extension.sgml | 42 ++++
src/backend/commands/extension.c | 217 ++++++++++++++------
src/backend/parser/gram.y | 4 +
src/bin/psql/tab-complete.c | 7 +-
src/test/modules/Makefile | 1 +
src/test/modules/test_extensions/.gitignore | 4 +
src/test/modules/test_extensions/Makefile | 23 +++
.../test_extensions/expected/test_extensions.out | 37 ++++
.../test_extensions/sql/test_extensions.sql | 15 ++
.../modules/test_extensions/test_ext1--1.0.sql | 3 +
src/test/modules/test_extensions/test_ext1.control | 5 +
.../modules/test_extensions/test_ext2--1.0.sql | 3 +
src/test/modules/test_extensions/test_ext2.control | 4 +
.../modules/test_extensions/test_ext3--1.0.sql | 3 +
src/test/modules/test_extensions/test_ext3.control | 3 +
.../modules/test_extensions/test_ext4--1.0.sql | 3 +
src/test/modules/test_extensions/test_ext4.control | 4 +
.../modules/test_extensions/test_ext5--1.0.sql | 3 +
src/test/modules/test_extensions/test_ext5.control | 3 +
.../test_extensions/test_ext_cyclic1--1.0.sql | 3 +
.../test_extensions/test_ext_cyclic1.control | 4 +
.../test_extensions/test_ext_cyclic2--1.0.sql | 3 +
.../test_extensions/test_ext_cyclic2.control | 4 +
src/tools/msvc/Mkvcbuild.pm | 3 +-
32 files changed, 346 insertions(+), 89 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-03 19:24 Peter Geoghegan <pg@heroku.com>
parent: Andres Freund <andres@anarazel.de>
1 sibling, 1 reply; 6+ messages in thread
From: Peter Geoghegan @ 2015-10-03 19:24 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers
On Sat, Oct 3, 2015 at 9:48 AM, Andres Freund <andres@anarazel.de> wrote:
> Add CASCADE support for CREATE EXTENSION.
As you may have noticed already, this patch fails to account for this
change in earthdistance regression test output:
+ HINT: Use CREATE EXTENSION CASCADE to install required extensions too.
--
Peter Geoghegan
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-03 19:27 Andres Freund <andres@anarazel.de>
parent: Peter Geoghegan <pg@heroku.com>
0 siblings, 0 replies; 6+ messages in thread
From: Andres Freund @ 2015-10-03 19:27 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: pgsql-committers
On 2015-10-03 12:24:57 -0700, Peter Geoghegan wrote:
> On Sat, Oct 3, 2015 at 9:48 AM, Andres Freund <andres@anarazel.de> wrote:
> > Add CASCADE support for CREATE EXTENSION.
>
> As you may have noticed already, this patch fails to account for this
> change in earthdistance regression test output:
>
> + HINT: Use CREATE EXTENSION CASCADE to install required extensions too.
Dang, yea. I'd already complained to Petr about it when I noticed. And
then just staged the hunk.
Greetings,
Andres Freund
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-04 03:47 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andres Freund <andres@anarazel.de>
1 sibling, 1 reply; 6+ messages in thread
From: Tom Lane @ 2015-10-04 03:47 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers
Andres Freund <andres@anarazel.de> writes:
> Add CASCADE support for CREATE EXTENSION.
Buildfarm results suggest this was not tested with python 3.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-04 10:55 Petr Jelinek <petr@2ndquadrant.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Petr Jelinek @ 2015-10-04 10:55 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers
On 2015-10-04 05:47, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
>> Add CASCADE support for CREATE EXTENSION.
>
> Buildfarm results suggest this was not tested with python 3.
>
Attached patch fixes it on my machine.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Attachments:
create-extension-cascade-python3-fix.diff (text/x-diff, 685B) download
diff --git a/src/pl/plpython/regress-python3-mangle.mk b/src/pl/plpython/regress-python3-mangle.mk
index d2c7490..6394815 100644
--- a/src/pl/plpython/regress-python3-mangle.mk
+++ b/src/pl/plpython/regress-python3-mangle.mk
@@ -25,6 +25,7 @@ pgregress-python3-mangle:
-e "s/LANGUAGE plpython2u/LANGUAGE plpython3u/g" \
-e "s/EXTENSION \([^ ]*_\)*plpythonu/EXTENSION \1plpython3u/g" \
-e "s/EXTENSION \([^ ]*_\)*plpython2u/EXTENSION \1plpython3u/g" \
+ -e 's/installing required extension "plpython2u"/installing required extension "plpython3u"/g' \
$$file >`echo $$file | sed 's,^.*/\([^/][^/]*/\)\([^/][^/]*\)$$,\1python3/\2,'` || exit; \
done
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Add CASCADE support for CREATE EXTENSION.
@ 2015-10-04 13:30 Andres Freund <andres@anarazel.de>
parent: Petr Jelinek <petr@2ndquadrant.com>
0 siblings, 0 replies; 6+ messages in thread
From: Andres Freund @ 2015-10-04 13:30 UTC (permalink / raw)
To: Petr Jelinek <petr@2ndquadrant.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On October 4, 2015 12:55:46 PM GMT+02:00, Petr Jelinek <petr@2ndquadrant.com> wrote:
>On 2015-10-04 05:47, Tom Lane wrote:
>> Andres Freund <andres@anarazel.de> writes:
>>> Add CASCADE support for CREATE EXTENSION.
>>
>> Buildfarm results suggest this was not tested with python 3.
>>
>
>Attached patch fixes it on my machine.
Thanks. Will take a look when I'm home (2h).
Andres
---
Please excuse brevity and formatting - I am writing this on my mobile phone.
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-10-04 13:30 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 16:48 pgsql: Add CASCADE support for CREATE EXTENSION. Andres Freund <andres@anarazel.de>
2015-10-03 19:24 ` Peter Geoghegan <pg@heroku.com>
2015-10-03 19:27 ` Andres Freund <andres@anarazel.de>
2015-10-04 03:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-10-04 10:55 ` Petr Jelinek <petr@2ndquadrant.com>
2015-10-04 13:30 ` Andres Freund <andres@anarazel.de>
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