1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

This doc patch replaces all inappropriate references to SQL:1999 when it

is used as if it were the latest (and/or still valid) SQL standard.
SQL:2003 is used in its place. Patch from Simon Riggs.
This commit is contained in:
Neil Conway 2005-07-14 06:17:36 +00:00
parent 29094193f5
commit c3f1b0f4dd
13 changed files with 39 additions and 41 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.43 2005/02/06 20:59:30 tgl Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.44 2005/07/14 06:17:35 neilc Exp $ -->
<sect1 id="arrays"> <sect1 id="arrays">
<title>Arrays</title> <title>Arrays</title>
@ -63,7 +63,7 @@ CREATE TABLE tictactoe (
</para> </para>
<para> <para>
An alternative syntax, which conforms to the SQL:1999 standard, may An alternative syntax, which conforms to the SQL:2003 standard, may
be used for one-dimensional arrays. be used for one-dimensional arrays.
<structfield>pay_by_quarter</structfield> could have been defined <structfield>pay_by_quarter</structfield> could have been defined
as: as:

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.41 2005/06/13 02:40:01 neilc Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.42 2005/07/14 06:17:35 neilc Exp $ -->
<chapter id="ddl"> <chapter id="ddl">
<title>Data Definition</title> <title>Data Definition</title>
@ -1122,7 +1122,7 @@ SELECT name, altitude
<para> <para>
In previous versions of <productname>PostgreSQL</productname>, the In previous versions of <productname>PostgreSQL</productname>, the
default behavior was not to include child tables in queries. This was default behavior was not to include child tables in queries. This was
found to be error prone and is also in violation of the SQL:1999 found to be error prone and is also in violation of the SQL:2003
standard. Under the old syntax, to get the sub-tables you append standard. Under the old syntax, to get the sub-tables you append
<literal>*</literal> to the table name. <literal>*</literal> to the table name.
For example For example

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.64 2005/05/20 12:36:48 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.65 2005/07/14 06:17:35 neilc Exp $
--> -->
<chapter id="ecpg"> <chapter id="ecpg">
@ -1146,8 +1146,8 @@ struct
The fields <literal>sqlca.sqlstate</literal> and The fields <literal>sqlca.sqlstate</literal> and
<literal>sqlca.sqlcode</literal> are two different schemes that <literal>sqlca.sqlcode</literal> are two different schemes that
provide error codes. Both are specified in the SQL standard, but provide error codes. Both are specified in the SQL standard, but
<literal>SQLCODE</literal> has been marked deprecated in the 1992 <literal>SQLCODE</literal> has been marked deprecated in SQL-92
edition of the standard and has been dropped in the 1999 edition. edition of the standard and has been dropped in later editions.
Therefore, new applications are strongly encouraged to use Therefore, new applications are strongly encouraged to use
<literal>SQLSTATE</literal>. <literal>SQLSTATE</literal>.
</para> </para>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/errcodes.sgml,v 1.13 2005/06/26 19:16:04 tgl Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/errcodes.sgml,v 1.14 2005/07/14 06:17:35 neilc Exp $ -->
<appendix id="errcodes-appendix"> <appendix id="errcodes-appendix">
<title><productname>PostgreSQL</productname> Error Codes</title> <title><productname>PostgreSQL</productname> Error Codes</title>
@ -127,7 +127,7 @@
<row> <row>
<entry>Class 02</entry> <entry>Class 02</entry>
<entry>No Data &mdash; this is also a warning class per SQL:1999</entry> <entry>No Data &mdash; this is also a warning class per SQL:2003</entry>
</row> </row>
<row> <row>

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.264 2005/07/10 04:54:30 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.265 2005/07/14 06:17:35 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -2543,8 +2543,8 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
There are three separate approaches to pattern matching provided There are three separate approaches to pattern matching provided
by <productname>PostgreSQL</productname>: the traditional by <productname>PostgreSQL</productname>: the traditional
<acronym>SQL</acronym> <function>LIKE</function> operator, the <acronym>SQL</acronym> <function>LIKE</function> operator, the
more recent <function>SIMILAR TO</function> operator (added in more recent <function>SIMILAR TO</function> operator (part of
SQL:1999), and <acronym>POSIX</acronym>-style regular expressions. SQL:2003), and <acronym>POSIX</acronym>-style regular expressions.
Additionally, a pattern matching function, Additionally, a pattern matching function,
<function>substring</function>, is available, using either <function>substring</function>, is available, using either
<function>SIMILAR TO</function>-style or POSIX-style regular <function>SIMILAR TO</function>-style or POSIX-style regular

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.15 2005/05/31 14:48:47 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/alter_domain.sgml,v 1.16 2005/07/14 06:17:36 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -203,7 +203,7 @@ ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
<title>Compatibility</title> <title>Compatibility</title>
<para> <para>
The <command>ALTER DOMAIN</command> statement is compatible with SQL:1999, The <command>ALTER DOMAIN</command> statement is compatible with SQL:2003,
except for the <literal>OWNER</> variant, which is a except for the <literal>OWNER</> variant, which is a
<productname>PostgreSQL</productname> extension. <productname>PostgreSQL</productname> extension.
</para> </para>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.20 2004/12/13 18:05:10 petere Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.21 2005/07/14 06:17:36 neilc Exp $ -->
<refentry id="SQL-CREATECAST"> <refentry id="SQL-CREATECAST">
<refmeta> <refmeta>
@ -298,8 +298,8 @@ CREATE CAST (text AS int4) WITH FUNCTION int4(text);
<title>Compatibility</title> <title>Compatibility</title>
<para> <para>
The <command>CREATE CAST</command> command conforms to SQL:1999, The <command>CREATE CAST</command> command conforms to SQL:2003,
except that SQL:1999 does not make provisions for binary-compatible except that SQL:2003 does not make provisions for binary-compatible
types or extra arguments to implementation functions. types or extra arguments to implementation functions.
<literal>AS IMPLICIT</> is a <productname>PostgreSQL</productname> <literal>AS IMPLICIT</> is a <productname>PostgreSQL</productname>
extension, too. extension, too.

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.65 2005/03/31 22:45:59 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.66 2005/07/14 06:17:36 neilc Exp $
--> -->
<refentry id="SQL-CREATEFUNCTION"> <refentry id="SQL-CREATEFUNCTION">
@ -478,7 +478,7 @@ SELECT * FROM dup(42);
<title>Compatibility</title> <title>Compatibility</title>
<para> <para>
A <command>CREATE FUNCTION</command> command is defined in SQL:1999 and later. A <command>CREATE FUNCTION</command> command is defined in SQL:2003.
The <productname>PostgreSQL</productname> version is similar but The <productname>PostgreSQL</productname> version is similar but
not fully compatible. The attributes are not portable, neither are the not fully compatible. The attributes are not portable, neither are the
different available languages. different available languages.

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.92 2005/02/02 06:35:59 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.93 2005/07/14 06:17:36 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -860,7 +860,7 @@ CREATE TABLE cinemas (
<para> <para>
The <command>CREATE TABLE</command> command conforms to SQL-92 and The <command>CREATE TABLE</command> command conforms to SQL-92 and
to a subset of SQL:1999, with exceptions listed below. to a subset of SQL:2003, with exceptions listed below.
</para> </para>
<refsect2> <refsect2>
@ -938,8 +938,8 @@ CREATE TABLE cinemas (
<para> <para>
Multiple inheritance via the <literal>INHERITS</literal> clause is Multiple inheritance via the <literal>INHERITS</literal> clause is
a <productname>PostgreSQL</productname> language extension. a <productname>PostgreSQL</productname> language extension.
SQL:1999 (but not SQL-92) defines single inheritance using a SQL:2003 defines single inheritance using a
different syntax and different semantics. SQL:1999-style different syntax and different semantics. SQL:2003-style
inheritance is not yet supported by inheritance is not yet supported by
<productname>PostgreSQL</productname>. <productname>PostgreSQL</productname>.
</para> </para>

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.40 2004/11/27 21:27:07 petere Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.41 2005/07/14 06:17:36 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -208,20 +208,19 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
<para> <para>
The <command>CREATE TRIGGER</command> statement in The <command>CREATE TRIGGER</command> statement in
<productname>PostgreSQL</productname> implements a subset of the <productname>PostgreSQL</productname> implements a subset of the
SQL:1999 standard. (There are no provisions for triggers in SQL-92.) SQL:2003 standard. The following functionality is currently missing:
The following functionality is missing:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
SQL:1999 allows triggers to fire on updates to specific columns SQL:2003 allows triggers to fire on updates to specific columns
(e.g., <literal>AFTER UPDATE OF col1, col2</literal>). (e.g., <literal>AFTER UPDATE OF col1, col2</literal>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
SQL:1999 allows you to define aliases for the <quote>old</quote> SQL:2003 allows you to define aliases for the <quote>old</quote>
and <quote>new</quote> rows or tables for use in the definition and <quote>new</quote> rows or tables for use in the definition
of the triggered action (e.g., <literal>CREATE TRIGGER ... ON of the triggered action (e.g., <literal>CREATE TRIGGER ... ON
tablename REFERENCING OLD ROW AS somename NEW ROW AS othername tablename REFERENCING OLD ROW AS somename NEW ROW AS othername
@ -235,7 +234,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
<listitem> <listitem>
<para> <para>
<productname>PostgreSQL</productname> only allows the execution <productname>PostgreSQL</productname> only allows the execution
of a user-defined function for the triggered action. SQL:1999 of a user-defined function for the triggered action. SQL:2003
allows the execution of a number of other SQL commands, such as allows the execution of a number of other SQL commands, such as
<command>CREATE TABLE</command> as triggered action. This <command>CREATE TABLE</command> as triggered action. This
limitation is not hard to work around by creating a user-defined limitation is not hard to work around by creating a user-defined
@ -246,7 +245,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
</para> </para>
<para> <para>
SQL:1999 specifies that multiple triggers should be fired in SQL:2003 specifies that multiple triggers should be fired in
time-of-creation order. <productname>PostgreSQL</productname> uses time-of-creation order. <productname>PostgreSQL</productname> uses
name order, which was judged more convenient to work with. name order, which was judged more convenient to work with.
</para> </para>

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_type.sgml,v 1.56 2005/07/10 21:13:57 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/create_type.sgml,v 1.57 2005/07/14 06:17:36 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -533,7 +533,7 @@ CREATE TABLE big_objs (
<para> <para>
This <command>CREATE TYPE</command> command is a This <command>CREATE TYPE</command> command is a
<productname>PostgreSQL</productname> extension. There is a <productname>PostgreSQL</productname> extension. There is a
<command>CREATE TYPE</command> statement in SQL:1999 and later that is rather <command>CREATE TYPE</command> statement in SQL:2003 that is rather
different in detail. different in detail.
</para> </para>
</refsect1> </refsect1>

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.87 2005/05/08 03:08:05 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.88 2005/07/14 06:17:36 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -1082,7 +1082,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward';
<title>Namespace Available to <literal>GROUP BY</literal> and <literal>ORDER BY</literal></title> <title>Namespace Available to <literal>GROUP BY</literal> and <literal>ORDER BY</literal></title>
<para> <para>
In the SQL-92 standard, an <literal>ORDER BY</literal> clause may In the SQL:2003 standard, an <literal>ORDER BY</literal> clause may
only use result column names or numbers, while a <literal>GROUP only use result column names or numbers, while a <literal>GROUP
BY</literal> clause may only use expressions based on input column BY</literal> clause may only use expressions based on input column
names. <productname>PostgreSQL</productname> extends each of names. <productname>PostgreSQL</productname> extends each of
@ -1095,11 +1095,11 @@ SELECT distributors.* WHERE distributors.name = 'Westward';
</para> </para>
<para> <para>
SQL:1999 uses a slightly different definition which is not entirely upward SQL:2003 uses a slightly different definition which is not entirely upward
compatible compatible with SQL-92.
with SQL-92. In most cases, however, <productname>PostgreSQL</productname> In most cases, however, <productname>PostgreSQL</productname>
will interpret an <literal>ORDER BY</literal> or <literal>GROUP will interpret an <literal>ORDER BY</literal> or <literal>GROUP
BY</literal> expression the same way SQL:1999 does. BY</literal> expression the same way SQL:2003 does.
</para> </para>
</refsect2> </refsect2>

View File

@ -1,5 +1,5 @@
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/sql.sgml,v 1.36 2005/04/28 21:47:09 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/sql.sgml,v 1.37 2005/07/14 06:17:35 neilc Exp $
--> -->
<chapter id="sql-intro"> <chapter id="sql-intro">
@ -98,8 +98,7 @@ $PostgreSQL: pgsql/doc/src/sgml/sql.sgml,v 1.36 2005/04/28 21:47:09 tgl Exp $
is under development. It is planned to make <acronym>SQL</acronym> is under development. It is planned to make <acronym>SQL</acronym>
a Turing-complete a Turing-complete
language, i.e. all computable queries (e.g. recursive queries) will be language, i.e. all computable queries (e.g. recursive queries) will be
possible. This is a very complex task and therefore the completion of possible. This has now been completed as SQL:2003.
the new standard can not be expected before 1999.
</para> </para>
<sect1 id="rel-model"> <sect1 id="rel-model">