Commit afd79873 authored by Peter Eisentraut's avatar Peter Eisentraut

Capitalize names of PLs consistently

Author: Daniel Gustafsson <daniel@yesql.se>
parent 193f5f9e
...@@ -3879,7 +3879,7 @@ SELECT oid, * FROM ft_pg_type WHERE typname = 'int4'; ...@@ -3879,7 +3879,7 @@ SELECT oid, * FROM ft_pg_type WHERE typname = 'int4';
(1 row) (1 row)
-- =================================================================== -- ===================================================================
-- used in pl/pgsql function -- used in PL/pgSQL function
-- =================================================================== -- ===================================================================
CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$
DECLARE DECLARE
......
...@@ -952,7 +952,7 @@ SELECT oid, * FROM ft_pg_type WHERE typname = 'int4'; ...@@ -952,7 +952,7 @@ SELECT oid, * FROM ft_pg_type WHERE typname = 'int4';
SELECT oid, * FROM ft_pg_type WHERE typname = 'int4'; SELECT oid, * FROM ft_pg_type WHERE typname = 'int4';
-- =================================================================== -- ===================================================================
-- used in pl/pgsql function -- used in PL/pgSQL function
-- =================================================================== -- ===================================================================
CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$ CREATE OR REPLACE FUNCTION f_test(p_c1 int) RETURNS int AS $$
DECLARE DECLARE
......
...@@ -205,7 +205,7 @@ $ENV{MSBFLAGS}="/m"; ...@@ -205,7 +205,7 @@ $ENV{MSBFLAGS}="/m";
<varlistentry> <varlistentry>
<term><productname>ActiveState TCL</productname></term> <term><productname>ActiveState TCL</productname></term>
<listitem><para> <listitem><para>
Required for building <application>PL/TCL</application> (Note: version Required for building <application>PL/Tcl</application> (Note: version
8.4 is required, the free Standard Distribution is sufficient). 8.4 is required, the free Standard Distribution is sufficient).
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
......
...@@ -149,7 +149,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; ...@@ -149,7 +149,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
which the system thinks that partial or incremental execution might which the system thinks that partial or incremental execution might
occur, no parallel plan is generated. For example, a cursor created occur, no parallel plan is generated. For example, a cursor created
using <link linkend="sql-declare">DECLARE CURSOR</link> will never use using <link linkend="sql-declare">DECLARE CURSOR</link> will never use
a parallel plan. Similarly, a PL/pgsql loop of the form a parallel plan. Similarly, a PL/pgSQL loop of the form
<literal>FOR x IN query LOOP .. END LOOP</literal> will never use a <literal>FOR x IN query LOOP .. END LOOP</literal> will never use a
parallel plan, because the parallel query system is unable to verify parallel plan, because the parallel query system is unable to verify
that the code in the loop is safe to execute while parallel query is that the code in the loop is safe to execute while parallel query is
...@@ -478,7 +478,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%'; ...@@ -478,7 +478,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
<para> <para>
Functions and aggregates must be marked <literal>PARALLEL UNSAFE</> if Functions and aggregates must be marked <literal>PARALLEL UNSAFE</> if
they write to the database, access sequences, change the transaction state they write to the database, access sequences, change the transaction state
even temporarily (e.g. a PL/pgsql function which establishes an even temporarily (e.g. a PL/pgSQL function which establishes an
<literal>EXCEPTION</> block to catch errors), or make persistent changes to <literal>EXCEPTION</> block to catch errors), or make persistent changes to
settings. Similarly, functions must be marked <literal>PARALLEL settings. Similarly, functions must be marked <literal>PARALLEL
RESTRICTED</> if they access temporary tables, client connection state, RESTRICTED</> if they access temporary tables, client connection state,
......
...@@ -4851,7 +4851,7 @@ a_output := a_output || $$ if v_$$ || referrer_keys.kind || $$ like '$$ ...@@ -4851,7 +4851,7 @@ a_output := a_output || $$ if v_$$ || referrer_keys.kind || $$ like '$$
<para> <para>
To aid the user in finding instances of simple but common problems before To aid the user in finding instances of simple but common problems before
they cause harm, <application>PL/PgSQL</> provides additional they cause harm, <application>PL/pgSQL</> provides additional
<replaceable>checks</>. When enabled, depending on the configuration, they <replaceable>checks</>. When enabled, depending on the configuration, they
can be used to emit either a <literal>WARNING</> or an <literal>ERROR</> can be used to emit either a <literal>WARNING</> or an <literal>ERROR</>
during the compilation of a function. A function which has received during the compilation of a function. A function which has received
......
...@@ -242,14 +242,14 @@ ...@@ -242,14 +242,14 @@
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
......
...@@ -312,14 +312,14 @@ ...@@ -312,14 +312,14 @@
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
...@@ -2439,9 +2439,9 @@ when the data directory is not specified (Magnus)</para></listitem> ...@@ -2439,9 +2439,9 @@ when the data directory is not specified (Magnus)</para></listitem>
(Neil)</para></listitem> (Neil)</para></listitem>
<listitem><para>Recover properly if error occurs during argument passing <listitem><para>Recover properly if error occurs during argument passing
in <application>PL/python</> (Neil)</para></listitem> in <application>PL/Python</> (Neil)</para></listitem>
<listitem><para>Fix <application>PL/perl</>'s handling of locales on <listitem><para>Fix <application>PL/Perl</>'s handling of locales on
Win32 to match the backend (Andrew)</para></listitem> Win32 to match the backend (Andrew)</para></listitem>
<listitem><para>Fix crash when <literal>log_min_messages</> is set to <listitem><para>Fix crash when <literal>log_min_messages</> is set to
......
...@@ -539,14 +539,14 @@ ...@@ -539,14 +539,14 @@
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
...@@ -3089,12 +3089,12 @@ when the data directory is not specified (Magnus)</para></listitem> ...@@ -3089,12 +3089,12 @@ when the data directory is not specified (Magnus)</para></listitem>
together in function result type declarations</para></listitem> together in function result type declarations</para></listitem>
<listitem><para>Recover properly if error occurs during argument passing <listitem><para>Recover properly if error occurs during argument passing
in <application>PL/python</> (Neil)</para></listitem> in <application>PL/Python</> (Neil)</para></listitem>
<listitem><para>Fix memory leak in <function>plperl_return_next</> <listitem><para>Fix memory leak in <function>plperl_return_next</>
(Neil)</para></listitem> (Neil)</para></listitem>
<listitem><para>Fix <application>PL/perl</>'s handling of locales on <listitem><para>Fix <application>PL/Perl</>'s handling of locales on
Win32 to match the backend (Andrew)</para></listitem> Win32 to match the backend (Andrew)</para></listitem>
<listitem><para>Various optimizer fixes (Tom)</para></listitem> <listitem><para>Various optimizer fixes (Tom)</para></listitem>
......
...@@ -1442,14 +1442,14 @@ ...@@ -1442,14 +1442,14 @@
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
......
...@@ -3022,14 +3022,14 @@ ...@@ -3022,14 +3022,14 @@
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
......
...@@ -5260,21 +5260,21 @@ ...@@ -5260,21 +5260,21 @@
<listitem> <listitem>
<para> <para>
Fix pl/pgsql's <literal>CASE</> statement to not fail when the Fix PL/pgSQL's <literal>CASE</> statement to not fail when the
case expression is a query that returns no rows (Tom) case expression is a query that returns no rows (Tom)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Update pl/perl's <filename>ppport.h</> for modern Perl versions Update PL/Perl's <filename>ppport.h</> for modern Perl versions
(Andrew) (Andrew)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Fix assorted memory leaks in pl/python (Andreas Freund, Tom) Fix assorted memory leaks in PL/Python (Andreas Freund, Tom)
</para> </para>
</listitem> </listitem>
......
...@@ -8828,7 +8828,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500 ...@@ -8828,7 +8828,7 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500
<listitem> <listitem>
<para> <para>
Add ability to retrieve the current PL/PgSQL call stack Add ability to retrieve the current PL/pgSQL call stack
using <link linkend="plpgsql-call-stack"><command>GET using <link linkend="plpgsql-call-stack"><command>GET
DIAGNOSTICS</></link> DIAGNOSTICS</></link>
(Pavel Stehule, Stephen Frost) (Pavel Stehule, Stephen Frost)
......
...@@ -3145,7 +3145,7 @@ Fix rare cursor crash when using hash join (Tom) ...@@ -3145,7 +3145,7 @@ Fix rare cursor crash when using hash join (Tom)
Fix for DROP TABLE/INDEX in rolled-back transaction (Hiroshi) Fix for DROP TABLE/INDEX in rolled-back transaction (Hiroshi)
Fix psql crash from \l+ if MULTIBYTE enabled (Peter E) Fix psql crash from \l+ if MULTIBYTE enabled (Peter E)
Fix truncation of rule names during CREATE VIEW (Ross Reedstrom) Fix truncation of rule names during CREATE VIEW (Ross Reedstrom)
Fix PL/perl (Alex Kapranoff) Fix PL/Perl (Alex Kapranoff)
Disallow LOCK on views (Mark Hollomon) Disallow LOCK on views (Mark Hollomon)
Disallow INSERT/UPDATE/DELETE on views (Mark Hollomon) Disallow INSERT/UPDATE/DELETE on views (Mark Hollomon)
Disallow DROP RULE, CREATE INDEX, TRUNCATE on views (Mark Hollomon) Disallow DROP RULE, CREATE INDEX, TRUNCATE on views (Mark Hollomon)
...@@ -3171,7 +3171,7 @@ Fix OVERLAPS operators conform to SQL92 spec regarding NULLs (Tom) ...@@ -3171,7 +3171,7 @@ Fix OVERLAPS operators conform to SQL92 spec regarding NULLs (Tom)
Fix lpad() and rpad() to handle length less than input string (Tom) Fix lpad() and rpad() to handle length less than input string (Tom)
Fix use of NOTIFY in some rules (Tom) Fix use of NOTIFY in some rules (Tom)
Overhaul btree code (Tom) Overhaul btree code (Tom)
Fix NOT NULL use in Pl/pgSQL variables (Tom) Fix NOT NULL use in PL/pgSQL variables (Tom)
Overhaul GIST code (Oleg) Overhaul GIST code (Oleg)
Fix CLUSTER to preserve constraints and column default (Tom) Fix CLUSTER to preserve constraints and column default (Tom)
Improved deadlock detection handling (Tom) Improved deadlock detection handling (Tom)
...@@ -4341,7 +4341,7 @@ Fix for lo_import crash(Tatsuo) ...@@ -4341,7 +4341,7 @@ Fix for lo_import crash(Tatsuo)
Adjust handling of data type names to suppress double quotes(Thomas) Adjust handling of data type names to suppress double quotes(Thomas)
Use type coercion for matching columns and DEFAULT(Thomas) Use type coercion for matching columns and DEFAULT(Thomas)
Fix deadlock so it only checks once after one second of sleep(Bruce) Fix deadlock so it only checks once after one second of sleep(Bruce)
Fixes for aggregates and PL/pgsql(Hiroshi) Fixes for aggregates and PL/pgSQL(Hiroshi)
Fix for subquery crash(Vadim) Fix for subquery crash(Vadim)
Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo) Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo)
Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo) Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo)
......
...@@ -153,7 +153,7 @@ SELECT clean_emp(); ...@@ -153,7 +153,7 @@ SELECT clean_emp();
<literal>CREATE TABLE foo (...); INSERT INTO foo VALUES(...);</literal> <literal>CREATE TABLE foo (...); INSERT INTO foo VALUES(...);</literal>
will not work as desired if packaged up into a single SQL function, will not work as desired if packaged up into a single SQL function,
since <structname>foo</> won't exist yet when the <command>INSERT</> since <structname>foo</> won't exist yet when the <command>INSERT</>
command is parsed. It's recommended to use <application>PL/PgSQL</> command is parsed. It's recommended to use <application>PL/pgSQL</>
instead of a SQL function in this type of situation. instead of a SQL function in this type of situation.
</para> </para>
</note> </note>
......
...@@ -154,7 +154,7 @@ parallelism was started before all parallel workers have exited; and it's even ...@@ -154,7 +154,7 @@ parallelism was started before all parallel workers have exited; and it's even
more clearly crazy for a parallel worker to try to subcommit or subabort the more clearly crazy for a parallel worker to try to subcommit or subabort the
current subtransaction and execute in some other transaction context than was current subtransaction and execute in some other transaction context than was
present in the initiating backend. It might be practical to allow internal present in the initiating backend. It might be practical to allow internal
sub-transactions (e.g. to implement a PL/pgsql EXCEPTION block) to be used in sub-transactions (e.g. to implement a PL/pgSQL EXCEPTION block) to be used in
parallel mode, provided that they are XID-less, because other backends parallel mode, provided that they are XID-less, because other backends
wouldn't really need to know about those transactions or do anything wouldn't really need to know about those transactions or do anything
differently because of them. Right now, we don't even allow that. differently because of them. Right now, we don't even allow that.
......
...@@ -1582,7 +1582,7 @@ SPI_result_code_string(int code) ...@@ -1582,7 +1582,7 @@ SPI_result_code_string(int code)
* SPI_plan_get_plan_sources --- get a SPI plan's underlying list of * SPI_plan_get_plan_sources --- get a SPI plan's underlying list of
* CachedPlanSources. * CachedPlanSources.
* *
* This is exported so that pl/pgsql can use it (this beats letting pl/pgsql * This is exported so that PL/pgSQL can use it (this beats letting PL/pgSQL
* look directly into the SPIPlan for itself). It's not documented in * look directly into the SPIPlan for itself). It's not documented in
* spi.sgml because we'd just as soon not have too many places using this. * spi.sgml because we'd just as soon not have too many places using this.
*/ */
...@@ -1598,7 +1598,7 @@ SPI_plan_get_plan_sources(SPIPlanPtr plan) ...@@ -1598,7 +1598,7 @@ SPI_plan_get_plan_sources(SPIPlanPtr plan)
* if the SPI plan contains exactly one CachedPlanSource. If not, * if the SPI plan contains exactly one CachedPlanSource. If not,
* return NULL. Caller is responsible for doing ReleaseCachedPlan(). * return NULL. Caller is responsible for doing ReleaseCachedPlan().
* *
* This is exported so that pl/pgsql can use it (this beats letting pl/pgsql * This is exported so that PL/pgSQL can use it (this beats letting PL/pgSQL
* look directly into the SPIPlan for itself). It's not documented in * look directly into the SPIPlan for itself). It's not documented in
* spi.sgml because we'd just as soon not have too many places using this. * spi.sgml because we'd just as soon not have too many places using this.
*/ */
......
...@@ -584,11 +584,11 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); ...@@ -584,11 +584,11 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
/* /*
* Non-keyword token types. These are hard-wired into the "flex" lexer. * Non-keyword token types. These are hard-wired into the "flex" lexer.
* They must be listed first so that their numeric codes do not depend on * They must be listed first so that their numeric codes do not depend on
* the set of keywords. PL/pgsql depends on this so that it can share the * the set of keywords. PL/pgSQL depends on this so that it can share the
* same lexer. If you add/change tokens here, fix PL/pgsql to match! * same lexer. If you add/change tokens here, fix PL/pgSQL to match!
* *
* DOT_DOT is unused in the core SQL grammar, and so will always provoke * DOT_DOT is unused in the core SQL grammar, and so will always provoke
* parse errors. It is needed by PL/pgsql. * parse errors. It is needed by PL/pgSQL.
*/ */
%token <str> IDENT FCONST SCONST BCONST XCONST Op %token <str> IDENT FCONST SCONST BCONST XCONST Op
%token <ival> ICONST PARAM %token <ival> ICONST PARAM
......
...@@ -1898,7 +1898,7 @@ setup_schema(FILE *cmdfd) ...@@ -1898,7 +1898,7 @@ setup_schema(FILE *cmdfd)
} }
/* /*
* load PL/pgsql server-side language * load PL/pgSQL server-side language
*/ */
static void static void
load_plpgsql(FILE *cmdfd) load_plpgsql(FILE *cmdfd)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* scanner.h * scanner.h
* API for the core scanner (flex machine) * API for the core scanner (flex machine)
* *
* The core scanner is also used by PL/pgsql, so we provide a public API * The core scanner is also used by PL/pgSQL, so we provide a public API
* for it. However, the rest of the backend is only expected to use the * for it. However, the rest of the backend is only expected to use the
* higher-level API provided by parser.h. * higher-level API provided by parser.h.
* *
......
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Makefile for the pl/pgsql procedural language # Makefile for the PL/pgSQL procedural language
# #
# src/pl/plpgsql/src/Makefile # src/pl/plpgsql/src/Makefile
# #
......
...@@ -2862,11 +2862,11 @@ make_execsql_stmt(int firsttoken, int location) ...@@ -2862,11 +2862,11 @@ make_execsql_stmt(int firsttoken, int location)
* clause lurking within it, and parse that via read_into_target(). * clause lurking within it, and parse that via read_into_target().
* *
* Because INTO is sometimes used in the main SQL grammar, we have to be * Because INTO is sometimes used in the main SQL grammar, we have to be
* careful not to take any such usage of INTO as a pl/pgsql INTO clause. * careful not to take any such usage of INTO as a PL/pgSQL INTO clause.
* There are currently three such cases: * There are currently three such cases:
* *
* 1. SELECT ... INTO. We don't care, we just override that with the * 1. SELECT ... INTO. We don't care, we just override that with the
* pl/pgsql definition. * PL/pgSQL definition.
* *
* 2. INSERT INTO. This is relatively easy to recognize since the words * 2. INSERT INTO. This is relatively easy to recognize since the words
* must appear adjacently; but we can't assume INSERT starts the command, * must appear adjacently; but we can't assume INSERT starts the command,
......
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Makefile for the pl/tcl procedural language # Makefile for the PL/Tcl procedural language
# #
# src/pl/tcl/Makefile # src/pl/tcl/Makefile
# #
......
...@@ -2535,7 +2535,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp, ...@@ -2535,7 +2535,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
* occur. FIXME someday. * occur. FIXME someday.
************************************************************/ ************************************************************/
plan_cxt = AllocSetContextCreate(TopMemoryContext, plan_cxt = AllocSetContextCreate(TopMemoryContext,
"PL/TCL spi_prepare query", "PL/Tcl spi_prepare query",
ALLOCSET_SMALL_SIZES); ALLOCSET_SMALL_SIZES);
MemoryContextSwitchTo(plan_cxt); MemoryContextSwitchTo(plan_cxt);
qdesc = (pltcl_query_desc *) palloc0(sizeof(pltcl_query_desc)); qdesc = (pltcl_query_desc *) palloc0(sizeof(pltcl_query_desc));
......
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