summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2018-04-27 17:42:03 +0000
committerTom Lane2018-04-27 17:42:03 +0000
commit2e83e6bd74ee8d4d119edf8272406f23e6c546cf (patch)
tree1e20a3ee92eb19e81f2f757bda36243c2fc6cb93
parent76ece169746f50652771a9fa9adc66d207e9d6f7 (diff)
Adjust hints and docs to suggest CREATE EXTENSION not CREATE LANGUAGE.
The core PLs have been extension-ified for seven years now, and we can reasonably hope that all out-of-core PLs have been too. So adjust a few places that were still recommending CREATE LANGUAGE as the user-level way to install a PL. Discussion: https://postgr.es/m/CA+TgmoaJTUDMSuSCg4k08Dv8vhbrJq9nP3ZfPbmysVz_616qxw@mail.gmail.com
-rw-r--r--doc/src/sgml/ref/create_transform.sgml4
-rw-r--r--doc/src/sgml/ref/do.sgml2
-rw-r--r--src/backend/commands/functioncmds.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/create_transform.sgml b/doc/src/sgml/ref/create_transform.sgml
index 17cb1932cf..4bce36b41a 100644
--- a/doc/src/sgml/ref/create_transform.sgml
+++ b/doc/src/sgml/ref/create_transform.sgml
@@ -157,7 +157,7 @@ CREATE [ OR REPLACE ] TRANSFORM FOR <replaceable>type_name</replaceable> LANGUAG
<programlisting>
CREATE TYPE hstore ...;
-CREATE LANGUAGE plpythonu ...;
+CREATE EXTENSION plpythonu;
</programlisting>
Then create the necessary functions:
<programlisting>
@@ -176,7 +176,7 @@ CREATE TRANSFORM FOR hstore LANGUAGE plpythonu (
TO SQL WITH FUNCTION plpython_to_hstore(internal)
);
</programlisting>
- In practice, these commands would be wrapped up in extensions.
+ In practice, these commands would be wrapped up in an extension.
</para>
<para>
diff --git a/doc/src/sgml/ref/do.sgml b/doc/src/sgml/ref/do.sgml
index b9a6f9a6fd..a3a4877e80 100644
--- a/doc/src/sgml/ref/do.sgml
+++ b/doc/src/sgml/ref/do.sgml
@@ -81,7 +81,7 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea
<para>
The procedural language to be used must already have been installed
- into the current database by means of <command>CREATE LANGUAGE</command>.
+ into the current database by means of <command>CREATE EXTENSION</command>.
<literal>plpgsql</literal> is installed by default, but other languages are not.
</para>
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index cc229bbecf..8864d9ae44 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -934,7 +934,7 @@ CreateFunction(ParseState *pstate, CreateFunctionStmt *stmt)
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("language \"%s\" does not exist", language),
(PLTemplateExists(language) ?
- errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
+ errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
languageOid = HeapTupleGetOid(languageTuple);
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
@@ -2136,7 +2136,7 @@ ExecuteDoStmt(DoStmt *stmt, bool atomic)
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("language \"%s\" does not exist", language),
(PLTemplateExists(language) ?
- errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
+ errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
codeblock->langOid = HeapTupleGetOid(languageTuple);
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);