Commit 5333e014 authored by Peter Eisentraut's avatar Peter Eisentraut

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 ee8ed85d.  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
parent a3b2bf1f
...@@ -110,11 +110,6 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa ...@@ -110,11 +110,6 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa
The name of the new procedural language. The name of the new procedural language.
The name must be unique among the languages in the database. The name must be unique among the languages in the database.
</para> </para>
<para>
For backward compatibility, the name can be enclosed by single
quotes.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -63,8 +63,7 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</ ...@@ -63,8 +63,7 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</
<term><replaceable class="parameter">name</replaceable></term> <term><replaceable class="parameter">name</replaceable></term>
<listitem> <listitem>
<para> <para>
The name of an existing procedural language. For backward The name of an existing procedural language.
compatibility, the name can be enclosed by single quotes.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -4346,7 +4346,7 @@ NumericOnly_list: NumericOnly { $$ = list_make1($1); } ...@@ -4346,7 +4346,7 @@ NumericOnly_list: NumericOnly { $$ = list_make1($1); }
*****************************************************************************/ *****************************************************************************/
CreatePLangStmt: CreatePLangStmt:
CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name
{ {
/* /*
* We now interpret parameterless CREATE LANGUAGE as * We now interpret parameterless CREATE LANGUAGE as
...@@ -4361,7 +4361,7 @@ CreatePLangStmt: ...@@ -4361,7 +4361,7 @@ CreatePLangStmt:
n->options = NIL; n->options = NIL;
$$ = (Node *)n; $$ = (Node *)n;
} }
| CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst | CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name
HANDLER handler_name opt_inline_handler opt_validator HANDLER handler_name opt_inline_handler opt_validator
{ {
CreatePLangStmt *n = makeNode(CreatePLangStmt); CreatePLangStmt *n = makeNode(CreatePLangStmt);
...@@ -4405,7 +4405,7 @@ opt_validator: ...@@ -4405,7 +4405,7 @@ opt_validator:
; ;
DropPLangStmt: DropPLangStmt:
DROP opt_procedural LANGUAGE NonReservedWord_or_Sconst opt_drop_behavior DROP opt_procedural LANGUAGE name opt_drop_behavior
{ {
DropStmt *n = makeNode(DropStmt); DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_LANGUAGE; n->removeType = OBJECT_LANGUAGE;
...@@ -4415,7 +4415,7 @@ DropPLangStmt: ...@@ -4415,7 +4415,7 @@ DropPLangStmt:
n->concurrent = false; n->concurrent = false;
$$ = (Node *)n; $$ = (Node *)n;
} }
| DROP opt_procedural LANGUAGE IF_P EXISTS NonReservedWord_or_Sconst opt_drop_behavior | DROP opt_procedural LANGUAGE IF_P EXISTS name opt_drop_behavior
{ {
DropStmt *n = makeNode(DropStmt); DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_LANGUAGE; n->removeType = OBJECT_LANGUAGE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment