Commit bc09d5e4 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove unnecessary use of PROCEDURAL

Remove some unnecessary, legacy-looking use of the PROCEDURAL keyword
before LANGUAGE.  We mostly don't use this anymore, so some of these
look a bit old.

There is still some use in pg_dump, which is harder to remove because
it's baked into the archive format, so I'm not touching that.

Discussion: https://www.postgresql.org/message-id/2330919b-62d9-29ac-8de3-58c024fdcb96@2ndquadrant.com
parent effe7d95
...@@ -137,7 +137,7 @@ CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid) ...@@ -137,7 +137,7 @@ CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid)
<para> <para>
Finally, the PL must be declared with the command Finally, the PL must be declared with the command
<synopsis> <synopsis>
CREATE <optional>TRUSTED</optional> <optional>PROCEDURAL</optional> LANGUAGE <replaceable>language-name</replaceable> CREATE <optional>TRUSTED</optional> LANGUAGE <replaceable>language-name</replaceable>
HANDLER <replaceable>handler_function_name</replaceable> HANDLER <replaceable>handler_function_name</replaceable>
<optional>INLINE <replaceable>inline_function_name</replaceable></optional> <optional>INLINE <replaceable>inline_function_name</replaceable></optional>
<optional>VALIDATOR <replaceable>validator_function_name</replaceable></optional> ; <optional>VALIDATOR <replaceable>validator_function_name</replaceable></optional> ;
...@@ -200,7 +200,7 @@ CREATE FUNCTION plperl_validator(oid) RETURNS void AS ...@@ -200,7 +200,7 @@ CREATE FUNCTION plperl_validator(oid) RETURNS void AS
<para> <para>
The command: The command:
<programlisting> <programlisting>
CREATE TRUSTED PROCEDURAL LANGUAGE plperl CREATE TRUSTED LANGUAGE plperl
HANDLER plperl_call_handler HANDLER plperl_call_handler
INLINE plperl_inline_handler INLINE plperl_inline_handler
VALIDATOR plperl_validator; VALIDATOR plperl_validator;
......
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* proclang.c * proclang.c
* PostgreSQL PROCEDURAL LANGUAGE support code. * PostgreSQL LANGUAGE support code.
* *
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
...@@ -55,9 +55,8 @@ static ObjectAddress create_proc_lang(const char *languageName, bool replace, ...@@ -55,9 +55,8 @@ static ObjectAddress create_proc_lang(const char *languageName, bool replace,
Oid valOid, bool trusted); Oid valOid, bool trusted);
static PLTemplate *find_language_template(const char *languageName); static PLTemplate *find_language_template(const char *languageName);
/* --------------------------------------------------------------------- /*
* CREATE PROCEDURAL LANGUAGE * CREATE LANGUAGE
* ---------------------------------------------------------------------
*/ */
ObjectAddress ObjectAddress
CreateProceduralLanguage(CreatePLangStmt *stmt) CreateProceduralLanguage(CreatePLangStmt *stmt)
......
...@@ -2433,8 +2433,7 @@ typedef struct AlterEventTrigStmt ...@@ -2433,8 +2433,7 @@ typedef struct AlterEventTrigStmt
} AlterEventTrigStmt; } AlterEventTrigStmt;
/* ---------------------- /* ----------------------
* Create/Drop PROCEDURAL LANGUAGE Statements * Create LANGUAGE Statements
* Create PROCEDURAL LANGUAGE Statements
* ---------------------- * ----------------------
*/ */
typedef struct CreatePLangStmt typedef struct CreatePLangStmt
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plperl; CREATE LANGUAGE plperl;
COMMENT ON PROCEDURAL LANGUAGE plperl IS 'PL/Perl procedural language'; COMMENT ON LANGUAGE plperl IS 'PL/Perl procedural language';
/* src/pl/plperl/plperl--unpackaged--1.0.sql */ /* src/pl/plperl/plperl--unpackaged--1.0.sql */
ALTER EXTENSION plperl ADD PROCEDURAL LANGUAGE plperl; ALTER EXTENSION plperl ADD LANGUAGE plperl;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plperl ADD FUNCTION plperl_call_handler(); ALTER EXTENSION plperl ADD FUNCTION plperl_call_handler();
ALTER EXTENSION plperl ADD FUNCTION plperl_inline_handler(internal); ALTER EXTENSION plperl ADD FUNCTION plperl_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plperlu; CREATE LANGUAGE plperlu;
COMMENT ON PROCEDURAL LANGUAGE plperlu IS 'PL/PerlU untrusted procedural language'; COMMENT ON LANGUAGE plperlu IS 'PL/PerlU untrusted procedural language';
/* src/pl/plperl/plperlu--unpackaged--1.0.sql */ /* src/pl/plperl/plperlu--unpackaged--1.0.sql */
ALTER EXTENSION plperlu ADD PROCEDURAL LANGUAGE plperlu; ALTER EXTENSION plperlu ADD LANGUAGE plperlu;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plperlu ADD FUNCTION plperlu_call_handler(); ALTER EXTENSION plperlu ADD FUNCTION plperlu_call_handler();
ALTER EXTENSION plperlu ADD FUNCTION plperlu_inline_handler(internal); ALTER EXTENSION plperlu ADD FUNCTION plperlu_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plpgsql; CREATE LANGUAGE plpgsql;
COMMENT ON PROCEDURAL LANGUAGE plpgsql IS 'PL/pgSQL procedural language'; COMMENT ON LANGUAGE plpgsql IS 'PL/pgSQL procedural language';
/* src/pl/plpgsql/src/plpgsql--unpackaged--1.0.sql */ /* src/pl/plpgsql/src/plpgsql--unpackaged--1.0.sql */
ALTER EXTENSION plpgsql ADD PROCEDURAL LANGUAGE plpgsql; ALTER EXTENSION plpgsql ADD LANGUAGE plpgsql;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plpgsql ADD FUNCTION plpgsql_call_handler(); ALTER EXTENSION plpgsql ADD FUNCTION plpgsql_call_handler();
ALTER EXTENSION plpgsql ADD FUNCTION plpgsql_inline_handler(internal); ALTER EXTENSION plpgsql ADD FUNCTION plpgsql_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plpython2u; CREATE LANGUAGE plpython2u;
COMMENT ON PROCEDURAL LANGUAGE plpython2u IS 'PL/Python2U untrusted procedural language'; COMMENT ON LANGUAGE plpython2u IS 'PL/Python2U untrusted procedural language';
/* src/pl/plpython/plpython2u--unpackaged--1.0.sql */ /* src/pl/plpython/plpython2u--unpackaged--1.0.sql */
ALTER EXTENSION plpython2u ADD PROCEDURAL LANGUAGE plpython2u; ALTER EXTENSION plpython2u ADD LANGUAGE plpython2u;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plpython2u ADD FUNCTION plpython2_call_handler(); ALTER EXTENSION plpython2u ADD FUNCTION plpython2_call_handler();
ALTER EXTENSION plpython2u ADD FUNCTION plpython2_inline_handler(internal); ALTER EXTENSION plpython2u ADD FUNCTION plpython2_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plpython3u; CREATE LANGUAGE plpython3u;
COMMENT ON PROCEDURAL LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language'; COMMENT ON LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';
/* src/pl/plpython/plpython3u--unpackaged--1.0.sql */ /* src/pl/plpython/plpython3u--unpackaged--1.0.sql */
ALTER EXTENSION plpython3u ADD PROCEDURAL LANGUAGE plpython3u; ALTER EXTENSION plpython3u ADD LANGUAGE plpython3u;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plpython3u ADD FUNCTION plpython3_call_handler(); ALTER EXTENSION plpython3u ADD FUNCTION plpython3_call_handler();
ALTER EXTENSION plpython3u ADD FUNCTION plpython3_inline_handler(internal); ALTER EXTENSION plpython3u ADD FUNCTION plpython3_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE plpythonu; CREATE LANGUAGE plpythonu;
COMMENT ON PROCEDURAL LANGUAGE plpythonu IS 'PL/PythonU untrusted procedural language'; COMMENT ON LANGUAGE plpythonu IS 'PL/PythonU untrusted procedural language';
/* src/pl/plpython/plpythonu--unpackaged--1.0.sql */ /* src/pl/plpython/plpythonu--unpackaged--1.0.sql */
ALTER EXTENSION plpythonu ADD PROCEDURAL LANGUAGE plpythonu; ALTER EXTENSION plpythonu ADD LANGUAGE plpythonu;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION plpythonu ADD FUNCTION plpython_call_handler(); ALTER EXTENSION plpythonu ADD FUNCTION plpython_call_handler();
ALTER EXTENSION plpythonu ADD FUNCTION plpython_inline_handler(internal); ALTER EXTENSION plpythonu ADD FUNCTION plpython_inline_handler(internal);
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE pltcl; CREATE LANGUAGE pltcl;
COMMENT ON PROCEDURAL LANGUAGE pltcl IS 'PL/Tcl procedural language'; COMMENT ON LANGUAGE pltcl IS 'PL/Tcl procedural language';
/* src/pl/tcl/pltcl--unpackaged--1.0.sql */ /* src/pl/tcl/pltcl--unpackaged--1.0.sql */
ALTER EXTENSION pltcl ADD PROCEDURAL LANGUAGE pltcl; ALTER EXTENSION pltcl ADD LANGUAGE pltcl;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION pltcl ADD FUNCTION pltcl_call_handler(); ALTER EXTENSION pltcl ADD FUNCTION pltcl_call_handler();
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
* knowledge into this script. * knowledge into this script.
*/ */
CREATE PROCEDURAL LANGUAGE pltclu; CREATE LANGUAGE pltclu;
COMMENT ON PROCEDURAL LANGUAGE pltclu IS 'PL/TclU untrusted procedural language'; COMMENT ON LANGUAGE pltclu IS 'PL/TclU untrusted procedural language';
/* src/pl/tcl/pltclu--unpackaged--1.0.sql */ /* src/pl/tcl/pltclu--unpackaged--1.0.sql */
ALTER EXTENSION pltclu ADD PROCEDURAL LANGUAGE pltclu; ALTER EXTENSION pltclu ADD LANGUAGE pltclu;
-- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to. -- ALTER ADD LANGUAGE doesn't pick up the support functions, so we have to.
ALTER EXTENSION pltclu ADD FUNCTION pltclu_call_handler(); ALTER EXTENSION pltclu ADD FUNCTION pltclu_call_handler();
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