11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003 /11/29 19:51:37 pgsql Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.23 2004 /11/27 21:27:06 petere Exp $
33-->
44
55<appendix id="features">
66 <title>SQL Conformance</title>
77
88 <para>
99 This section attempts to outline to what extent
10- <productname>PostgreSQL</productname> conforms to theSQL standard.
11- Full compliance to the standard or a complete statementabout the
12- compliance to thestandard is complicated and not particularly
13- useful, so this section can only give an overview .
14- </para>
10+ <productname>PostgreSQL</productname> conforms to thecurrent SQL
11+ standard. The following information is not a full statementof
12+ conformance, but it presents themain topics in as much detail as is
13+ both reasonable and useful for users .
14+ </para>
1515
1616 <para>
1717 The formal name of the SQL standard is ISO/IEC 9075 <quote>Database
1818 Language SQL</quote>. A revised version of the standard is released
19- from time to time; the most recent one appearing in 1999. That
20- version is referred to as ISO/IEC 9075:1999, or informally as SQL99.
21- The version prior to that was SQL92.
22- <productname>PostgreSQL</productname> development tends to aim for
19+ from time to time; the most recent one appearing in late 2003. That
20+ version is referred to as ISO/IEC 9075:2003, or simply as SQL:2003.
21+ The versions prior to that were SQL:1999 and SQL-92. Each version
22+ replaces the previous one, so claims of conformance to earlier
23+ versions have no official merit.
24+ <productname>PostgreSQL</productname> development aims for
2325 conformance with the latest official version of the standard where
2426 such conformance does not contradict traditional features or common
25- sense. At the time of this writing, balloting is under way for a
26- new revision of the standard, which, if approved, will eventually
27- become the conformance target for future
28- <productname>PostgreSQL</productname> development.
27+ sense. The PostgreSQL project was not represented in the ISO/IEC
28+ 9075 Working Group during the preparation of SQL:2003. Even so,
29+ many of the features required by SQL:2003 are already supported,
30+ though sometimes with slightly differing syntax or function.
31+ Further moves towards conformance may be expected in later releases.
32+ </para>
33+
34+ <para>
35+ <acronym>SQL-92</acronym> defined three feature sets for
36+ conformance: Entry, Intermediate, and Full. Most database
37+ management systems claiming <acronym>SQL</acronym> standard
38+ conformance were conforming at only the Entry level, since the
39+ entire set of features in the Intermediate and Full levels was
40+ either too voluminous or in conflict with legacy behaviors.
2941 </para>
3042
3143 <para>
32- <acronym>SQL92</acronym> defined three feature sets for conformance:
33- Entry, Intermediate, and Full. Most database management systems claiming
34- <acronym>SQL</acronym> standard conformance were conforming at only
35- the Entry level, since the entire set of features in the
36- Intermediate and Full levels was either too voluminous or in
37- conflict with legacy behaviors.
44+ Starting with <acronym>SQL:1999</acronym>, the SQL standard defines
45+ a large set of individual features rather than the ineffectively
46+ broad three levels found in <acronym>SQL-92</acronym>. A large
47+ subset of these features represents the <quote>Core</quote>
48+ features, which every conforming SQL implementation must supply.
49+ The rest of the features are purely optional. Some optional
50+ features are grouped together to form <quote>packages</quote>, which
51+ SQL implementations can claim conformance to, thus claiming
52+ conformance to particular groups of features.
3853 </para>
3954
4055 <para>
41- <acronym>SQL99</acronym> defines a large set of individual features
42- rather than the ineffectively broad three levels found in
43- <acronym>SQL92</acronym>. A large subset of these features
44- represents the <quote>core</quote> features, which every conforming
45- SQL implementation must supply. The rest of the features are purely
46- optional. Some optional features are grouped together to form
47- <quote>packages</quote>, which SQL implementations can claim
48- conformance to, thus claiming conformance to particular groups of
49- features.
56+ The <acronym>SQL:2003</acronym> standard is also split into a number
57+ of parts. Each is known by a shorthand name. Note that these parts
58+ are not consecutively numbered.
59+
60+ <itemizedlist>
61+ <listitem><para>ISO/IEC 9075-1 Framework (<acronym>SQL/Framework</acronym>)</para></listitem>
62+ <listitem><para>ISO/IEC 9075-2 Foundation (<acronym>SQL/Foundation</acronym>)</para></listitem>
63+ <listitem><para>ISO/IEC 9075-3 Call Level Interface (<acronym>SQL/CLI</acronym>)</para></listitem>
64+ <listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (<acronym>SQL/PSM</acronym>)</para></listitem>
65+ <listitem><para>ISO/IEC 9075-9 Management of External Data (<acronym>SQL/MED</acronym>)</para></listitem>
66+ <listitem><para>ISO/IEC 9075-10 Object Language Bindings (<acronym>SQL/OLB</acronym>)</para></listitem>
67+ <listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (<acronym>SQL/Schemata</acronym>)</para></listitem>
68+ <listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (<acronym>SQL/JRT</acronym>)</para></listitem>
69+ <listitem><para>ISO/IEC 9075-14 XML-related specifications (<acronym>SQL/XML</acronym>)</para></listitem>
70+ </itemizedlist>
5071 </para>
5172
5273 <para>
53- The <acronym>SQL99</acronym> standard is also split into 5 parts:
54- Framework, Foundation, Call Level Interface, Persistent Stored
55- Modules, and Host Language Bindings.
56- <productname>PostgreSQL</productname> only covers parts 1, 2, and 5.
74+ <productname>PostgreSQL</productname> covers parts 1, 2, and 11.
5775 Part 3 is similar to the ODBC interface, and part 4 is similar to
5876 the <application>PL/pgSQL</application> programming language, but
59- exact conformance is not specifically intended in either case.
77+ exact conformance is not specifically intended or verified in either
78+ case.
79+ </para>
80+
81+ <para>
82+ PostgreSQL supports most of the major features of SQL:2003. Out of
83+ 164 mandatory features required for full Core conformance,
84+ PostgreSQL conforms to at least 150. In addition, there is a long
85+ list of supported optional features. It may be worth noting that at
86+ the time of writing, no current version of any database management
87+ system claims full conformance to Core SQL:2003.
6088 </para>
6189
6290 <para>
6391 In the following two sections, we provide a list of those features
6492 that <productname>PostgreSQL</productname> supports, followed by a
65- list of the features defined inSQL99 which are not yet supported in
66- <productname>PostgreSQL</productname>. Both of these lists are
67- approximate: There may be minor details that are nonconforming for a
68- feature that is listed as supported, and large parts of an
69- unsupported feature may in fact be implemented. The main body of
70- the documentation always contains the most accurate information
71- about what does and does not work.
93+ list of the features defined in<acronym>SQL:2003</acronym> which
94+ are not yet supported in <productname>PostgreSQL</productname>.
95+ Both of these lists are approximate: There may be minor details that
96+ are nonconforming for a feature that is listed as supported, and
97+ large parts of an unsupported feature may in fact be implemented.
98+ The main body of the documentation always contains the most accurate
99+ information about what does and does not work.
72100 </para>
73101
74102 <note>
@@ -79,7 +107,7 @@ $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003/11/29 19:51:37 pgsql E
79107 </para>
80108 </note>
81109
82- <sect1 id="features-sql99 ">
110+ <sect1 id="features-sql-standard ">
83111 <title>Supported Features</title>
84112
85113 <para>
@@ -101,11 +129,11 @@ $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003/11/29 19:51:37 pgsql E
101129 </para>
102130 </sect1>
103131
104- <sect1 id="unsupported-features-sql99 ">
132+ <sect1 id="unsupported-features-sql-standard ">
105133 <title>Unsupported Features</title>
106134
107135 <para>
108- The following features defined in <acronym>SQL99 </acronym> are not
136+ The following features defined in <acronym>SQL:2003 </acronym> are not
109137 implemented in this release of
110138 <productname>PostgreSQL</productname>. In a few cases, equivalent
111139 functionality is available.