From ca7e4f9dfde3b7dda8a64af819c168b5670c50cd Mon Sep 17 00:00:00 2001
From: David Yozie
Date: Thu, 18 Apr 2019 10:20:01 -0700
Subject: [PATCH] Update PL's to use CREATE/DROP EXTENSION (#7490)
* update pl/r docs to use CREATE EXTENSION
* update pl/perl, /python, update deprecation notices, add CASCADE info
* Feedback from Chuck
* Update postgresql.org hrefs to 9.4
* Feedback from Lisa
---
.../dita/ref_guide/extensions/pl_java.xml | 3 ++
.../dita/ref_guide/extensions/pl_perl.xml | 43 +++++++------------
.../dita/ref_guide/extensions/pl_python.xml | 37 ++++++++--------
gpdb-doc/dita/ref_guide/extensions/pl_r.xml | 43 ++++++++++---------
.../sql_commands/CREATE_LANGUAGE.xml | 32 ++++++++------
.../client_utilities/createlang.xml | 2 +
6 files changed, 79 insertions(+), 81 deletions(-)
diff --git a/gpdb-doc/dita/ref_guide/extensions/pl_java.xml b/gpdb-doc/dita/ref_guide/extensions/pl_java.xml
index 13a6010e80..6359e2266e 100644
--- a/gpdb-doc/dita/ref_guide/extensions/pl_java.xml
+++ b/gpdb-doc/dita/ref_guide/extensions/pl_java.xml
@@ -302,6 +302,9 @@
database. For example, this command disables the PL/Java language in the
testdb database:
$ psql -d testdb -c 'DROP EXTENSION pljava;'
+ The default command fails if any existing objects (such as functions) depend on the
+ language. Specify the CASCADE option to also drop all dependent objects,
+ including functions that you created with PL/Java.
The PL/Java uninstall.sql script, used in previous releases to remove
the language registration, is deprecated.
For each database in which you want to enable PL/Perl, register the language
- using the SQL CREATE LANGUAGE command or the Greenplum Database
- createlang utility. For example, run the following
+ using the SQL CREATE
+ EXTENSION command. For example, run the following
command as the gpadmin user to register the trusted PL/Perl
language for the database named testdb:
- $ createlang plperl -d testdb
+ $ psql -d testdb -c 'CREATE EXTENSION plperl;'
For each database that requires its use, register the PL/Python language with the SQL
- command CREATE LANGUAGE or the Greenplum Database utility
- createlang. Because PL/Python is an untrusted language, only superusers
- can register PL/Python with a database. For example, running this command as the
- gpadmin system user registers PL/Python with the database named
+ command CREATE EXTENSION. Because PL/Python is an untrusted language,
+ only superusers can register PL/Python with a database. For example, running this command
+ as the gpadmin user registers PL/Python with the database named
testdb:
- $ createlang plpythonu -d testdb
+ $ psql -d testdb -c 'CREATE EXTENSION plpythonu;'
PL/Python is registered as an untrusted language.
For a database that no longer requires the PL/Python language, remove support for
- PL/Python with the SQL command DROP LANGUAGE or the Greenplum Database
- droplang utility. Because PL/Python is an untrusted language, only
- superusers can remove support for the PL/Python language from a database. For example,
- running this command as the gpadmin system user removes support for
- PL/Python from the database named testdb:
- $ droplang plpythonu -d testdb
- When you remove support for PL/Python, the PL/Python user-defined functions that you
- created in the database will no longer work.
+ PL/Python with the SQL command DROP EXTENSION. Because PL/Python is an
+ untrusted language, only superusers can remove support for the PL/Python language from a
+ database. For example, running this command as the gpadmin user removes
+ support for PL/Python from the database named testdb:
+ $ psql -d testdb -c 'DROP EXTENSION plpythonu;'
+ The default command fails if any existing objects (such as functions) depend on the
+ language. Specify the CASCADE option to also drop all dependent objects,
+ including functions that you created with PL/Python.