1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

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 ee8ed85da3.  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
This commit is contained in:
Peter Eisentraut
2020-06-11 10:26:12 +02:00
parent a3b2bf1fe7
commit 5333e014ab
3 changed files with 5 additions and 11 deletions

View File

@ -4346,7 +4346,7 @@ NumericOnly_list: NumericOnly { $$ = list_make1($1); }
*****************************************************************************/
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
@ -4361,7 +4361,7 @@ CreatePLangStmt:
n->options = NIL;
$$ = (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
{
CreatePLangStmt *n = makeNode(CreatePLangStmt);
@ -4405,7 +4405,7 @@ opt_validator:
;
DropPLangStmt:
DROP opt_procedural LANGUAGE NonReservedWord_or_Sconst opt_drop_behavior
DROP opt_procedural LANGUAGE name opt_drop_behavior
{
DropStmt *n = makeNode(DropStmt);
n->removeType = OBJECT_LANGUAGE;
@ -4415,7 +4415,7 @@ DropPLangStmt:
n->concurrent = false;
$$ = (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);
n->removeType = OBJECT_LANGUAGE;