Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e83e6b

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 canreasonably hope that all out-of-core PLs have been too. So adjust a fewplaces that were still recommending CREATE LANGUAGE as the user-levelway to install a PL.Discussion:https://postgr.es/m/CA+TgmoaJTUDMSuSCg4k08Dv8vhbrJq9nP3ZfPbmysVz_616qxw@mail.gmail.com
1 parent76ece16 commit2e83e6b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎doc/src/sgml/ref/create_transform.sgml

Lines changed: 2 additions & 2 deletions
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-
CREATELANGUAGE plpythonu ...;
160+
CREATEEXTENSION 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 inextensions.
179+
In practice, these commands would be wrapped up inan extension.
180180
</para>
181181

182182
<para>

‎doc/src/sgml/ref/do.sgml

Lines changed: 1 addition & 1 deletion
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>CREATELANGUAGE</command>.
84+
into the current database by means of <command>CREATEEXTENSION</command>.
8585
<literal>plpgsql</literal> is installed by default, but other languages are not.
8686
</para>
8787

‎src/backend/commands/functioncmds.c

Lines changed: 2 additions & 2 deletions
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 CREATELANGUAGE to load the language into the database.") :0)));
937+
errhint("Use CREATEEXTENSION 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 CREATELANGUAGE to load the language into the database.") :0)));
2139+
errhint("Use CREATEEXTENSION 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)

[8]ページ先頭

©2009-2025 Movatter.jp