1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Don't treat NEW and OLD as reserved words anymore. For the purposes of rules

it works just as well to have them be ordinary identifiers, and this gets rid
of a number of ugly special cases.  Plus we aren't interfering with non-rule
usage of these names.

catversion bump because the names change internally in stored rules.
This commit is contained in:
Tom Lane
2009-11-05 23:24:27 +00:00
parent 45d7e04fce
commit 593f4b854a
18 changed files with 84 additions and 156 deletions

View File

@@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.137 2009/10/08 02:39:16 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.138 2009/11/05 23:24:22 tgl Exp $ -->
<chapter id="sql-syntax">
<title>SQL Syntax</title>
@@ -1312,10 +1312,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
<para>
<replaceable>correlation</replaceable> is the name of a
table (possibly qualified with a schema name), or an alias for a table
defined by means of a <literal>FROM</literal> clause, or one of
the key words <literal>NEW</literal> or <literal>OLD</literal>.
(<literal>NEW</literal> and <literal>OLD</literal> can only appear in rewrite rules,
while other correlation names can be used in any SQL statement.)
defined by means of a <literal>FROM</literal> clause.
The correlation name and separating dot can be omitted if the column name
is unique across all the tables being used in the current query. (See also <xref linkend="queries">.)
</para>