Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2e83e6b

Browse files
committed
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
1 parent 76ece16 commit 2e83e6b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/src/sgml/ref/create_transform.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ CREATE [ OR REPLACE ] TRANSFORM FOR <replaceable>type_name</replaceable> LANGUAG
157157
<programlisting>
158158
CREATE TYPE hstore ...;
159159

160-
CREATE LANGUAGE plpythonu ...;
160+
CREATE EXTENSION plpythonu;
161161
</programlisting>
162162
Then create the necessary functions:
163163
<programlisting>
@@ -176,7 +176,7 @@ CREATE TRANSFORM FOR hstore LANGUAGE plpythonu (
176176
TO SQL WITH FUNCTION plpython_to_hstore(internal)
177177
);
178178
</programlisting>
179-
In practice, these commands would be wrapped up in extensions.
179+
In practice, these commands would be wrapped up in an extension.
180180
</para>
181181

182182
<para>

doc/src/sgml/ref/do.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ DO [ LANGUAGE <replaceable class="parameter">lang_name</replaceable> ] <replacea
8181

8282
<para>
8383
The procedural language to be used must already have been installed
84-
into the current database by means of <command>CREATE LANGUAGE</command>.
84+
into the current database by means of <command>CREATE EXTENSION</command>.
8585
<literal>plpgsql</literal> is installed by default, but other languages are not.
8686
</para>
8787

src/backend/commands/functioncmds.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ CreateFunction(ParseState *pstate, CreateFunctionStmt *stmt)
934934
(errcode(ERRCODE_UNDEFINED_OBJECT),
935935
errmsg("language \"%s\" does not exist", language),
936936
(PLTemplateExists(language) ?
937-
errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
937+
errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
938938

939939
languageOid = HeapTupleGetOid(languageTuple);
940940
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
@@ -2136,7 +2136,7 @@ ExecuteDoStmt(DoStmt *stmt, bool atomic)
21362136
(errcode(ERRCODE_UNDEFINED_OBJECT),
21372137
errmsg("language \"%s\" does not exist", language),
21382138
(PLTemplateExists(language) ?
2139-
errhint("Use CREATE LANGUAGE to load the language into the database.") : 0)));
2139+
errhint("Use CREATE EXTENSION to load the language into the database.") : 0)));
21402140

21412141
codeblock->langOid = HeapTupleGetOid(languageTuple);
21422142
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);

0 commit comments

Comments
 (0)