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 type_name LANGUAG
CREATE TYPE hstore ...;
-CREATE LANGUAGE plpythonu ...;
+CREATE EXTENSION plpythonu;
Then create the necessary functions:
@@ -176,7 +176,7 @@ CREATE TRANSFORM FOR hstore LANGUAGE plpythonu (
TO SQL WITH FUNCTION plpython_to_hstore(internal)
);
- In practice, these commands would be wrapped up in extensions.
+ In practice, these commands would be wrapped up in an extension.
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 lang_name ]
The procedural language to be used must already have been installed
- into the current database by means of CREATE LANGUAGE.
+ into the current database by means of CREATE EXTENSION.
plpgsql is installed by default, but other languages are not.
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);