Skip to content

Commit 5333e01

Browse files
committed
Remove deprecated syntax from CREATE/DROP LANGUAGE
Remove the option to specify the language name as a single-quoted string. This has been obsolete since ee8ed85. Removing it allows better grammar refactoring. The syntax of the CREATE FUNCTION LANGUAGE clause is not changed. Discussion: https://www.postgresql.org/message-id/flat/163c00a5-f634-ca52-fc7c-0e53deda8735%402ndquadrant.com
1 parent a3b2bf1 commit 5333e01

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

doc/src/sgml/ref/create_language.sgml

-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa
110110
The name of the new procedural language.
111111
The name must be unique among the languages in the database.
112112
</para>
113-
114-
<para>
115-
For backward compatibility, the name can be enclosed by single
116-
quotes.
117-
</para>
118113
</listitem>
119114
</varlistentry>
120115

doc/src/sgml/ref/drop_language.sgml

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</
6363
<term><replaceable class="parameter">name</replaceable></term>
6464
<listitem>
6565
<para>
66-
The name of an existing procedural language. For backward
67-
compatibility, the name can be enclosed by single quotes.
66+
The name of an existing procedural language.
6867
</para>
6968
</listitem>
7069
</varlistentry>

src/backend/parser/gram.y

+4-4
Original file line numberDiff line numberDiff line change
@@ -4346,7 +4346,7 @@ NumericOnly_list: NumericOnly { $$ = list_make1($1); }
43464346
*****************************************************************************/
43474347

43484348
CreatePLangStmt:
4349-
CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst
4349+
CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name
43504350
{
43514351
/*
43524352
* We now interpret parameterless CREATE LANGUAGE as
@@ -4361,7 +4361,7 @@ CreatePLangStmt:
43614361
n->options = NIL;
43624362
$$ = (Node *)n;
43634363
}
4364-
| CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst
4364+
| CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name
43654365
HANDLER handler_name opt_inline_handler opt_validator
43664366
{
43674367
CreatePLangStmt *n = makeNode(CreatePLangStmt);
@@ -4405,7 +4405,7 @@ opt_validator:
44054405
;
44064406

44074407
DropPLangStmt:
4408-
DROP opt_procedural LANGUAGE NonReservedWord_or_Sconst opt_drop_behavior
4408+
DROP opt_procedural LANGUAGE name opt_drop_behavior
44094409
{
44104410
DropStmt *n = makeNode(DropStmt);
44114411
n->removeType = OBJECT_LANGUAGE;
@@ -4415,7 +4415,7 @@ DropPLangStmt:
44154415
n->concurrent = false;
44164416
$$ = (Node *)n;
44174417
}
4418-
| DROP opt_procedural LANGUAGE IF_P EXISTS NonReservedWord_or_Sconst opt_drop_behavior
4418+
| DROP opt_procedural LANGUAGE IF_P EXISTS name opt_drop_behavior
44194419
{
44204420
DropStmt *n = makeNode(DropStmt);
44214421
n->removeType = OBJECT_LANGUAGE;

0 commit comments

Comments
 (0)