]> granicus.if.org Git - postgresql/blob - doc/src/sgml/features.sgml
Allow the planner's estimate of the fraction of a cursor's rows that will be
[postgresql] / doc / src / sgml / features.sgml
1 <!-- $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.27 2007/02/03 17:59:35 petere Exp $ -->
2
3 <appendix id="features">
4  <title>SQL Conformance</title>
5
6  <para>
7   This section attempts to outline to what extent
8   <productname>PostgreSQL</productname> conforms to the current SQL
9   standard.  The following information is not a full statement of
10   conformance, but it presents the main topics in as much detail as is
11   both reasonable and useful for users.
12  </para>
13
14  <para>
15   The formal name of the SQL standard is ISO/IEC 9075 <quote>Database
16   Language SQL</quote>.  A revised version of the standard is released
17   from time to time; the most recent full update appearing in 2003,
18   with a partial update appearing in 2006.  The 2003 version is
19   referred to as ISO/IEC 9075:2003, or simply as SQL:2003.  The
20   versions prior to that were SQL:1999 and SQL-92.  Each version
21   replaces the previous one, so claims of conformance to earlier
22   versions have no official merit.
23   <productname>PostgreSQL</productname> development aims for
24   conformance with the latest official version of the standard where
25   such conformance does not contradict traditional features or common
26   sense.  The PostgreSQL project is not represented in the ISO/IEC
27   9075 Working Group during the preparation of the SQL standard
28   releases, but even so, many of the features required by the SQL
29   standard are supported, though sometimes with slightly differing
30   syntax or function.  Further moves towards conformance can be
31   expected over time.
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.
41  </para>
42
43  <para>
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.
53  </para>
54
55  <para>
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 (SQL/Framework)</para></listitem>
62    <listitem><para>ISO/IEC 9075-2 Foundation (SQL/Foundation)</para></listitem>
63    <listitem><para>ISO/IEC 9075-3 Call Level Interface (SQL/CLI)</para></listitem>
64    <listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)</para></listitem>
65    <listitem><para>ISO/IEC 9075-9 Management of External Data (SQL/MED)</para></listitem>
66    <listitem><para>ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)</para></listitem>
67    <listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (SQL/Schemata)</para></listitem>
68    <listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)</para></listitem>
69    <listitem><para>ISO/IEC 9075-14 XML-related specifications (SQL/XML)</para></listitem>
70   </itemizedlist>
71  </para>
72
73  <para>
74   <productname>PostgreSQL</productname> covers parts 1, 2, 11, and 14.
75   Part 3 is similar to the ODBC interface, and part 4 is similar to
76   the <application>PL/pgSQL</application> programming language, but
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 might 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.
88  </para>
89
90  <para>
91   In the following two sections, we provide a list of those features
92   that <productname>PostgreSQL</productname> supports, followed by a
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 might be minor details that
96   are nonconforming for a feature that is listed as supported, and
97   large parts of an unsupported feature might 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.
100  </para>
101
102  <note>
103   <para>
104    Feature codes containing a hyphen are subfeatures.  Therefore, if a
105    particular subfeature is not supported, the main feature is listed
106    as unsupported even if some other subfeatures are supported.
107   </para>
108  </note>
109
110   <sect1 id="features-sql-standard">
111    <title>Supported Features</title>
112
113    <para>
114     <informaltable>
115      <tgroup cols="4">
116       <thead>
117        <row>
118         <entry>Identifier</entry>
119         <entry>Package</entry>
120         <entry>Description</entry>
121         <entry>Comment</entry>
122        </row>
123       </thead>
124
125       &features-supported;
126
127      </tgroup>
128     </informaltable>
129    </para>
130   </sect1>
131
132   <sect1 id="unsupported-features-sql-standard">
133    <title>Unsupported Features</title>
134
135    <para>
136     The following features defined in <acronym>SQL:2003</acronym> are not
137     implemented in this release of
138     <productname>PostgreSQL</productname>. In a few cases, equivalent
139     functionality is available.
140
141     <informaltable>
142      <tgroup cols="4">
143       <thead>
144        <row>
145         <entry>Identifier</entry>
146         <entry>Package</entry>
147         <entry>Description</entry>
148         <entry>Comment</entry>
149        </row>
150       </thead>
151
152       &features-unsupported;
153
154      </tgroup>
155     </informaltable>
156    </para>
157   </sect1>
158
159  </appendix>