1
<!-- doc/src/sgml/features.sgml -->
3
<appendix id="features">
4
<title>SQL Conformance</title>
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.
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 update appearing in 2008.
18
The 2008 version is referred to as ISO/IEC 9075:2008, or simply as SQL:2008.
19
The versions prior to that were SQL:2003, SQL:1999, and SQL-92. Each version
20
replaces the previous one, so claims of conformance to earlier
21
versions have no official merit.
22
<productname>PostgreSQL</productname> development aims for
23
conformance with the latest official version of the standard where
24
such conformance does not contradict traditional features or common
25
sense. The PostgreSQL project is not represented in the ISO/IEC
26
9075 Working Group during the preparation of the SQL standard
27
releases, but even so, many of the features required by the SQL
28
standard are supported, though sometimes with slightly differing
29
syntax or function. Further moves towards conformance can be
34
<acronym>SQL-92</acronym> defined three feature sets for
35
conformance: Entry, Intermediate, and Full. Most database
36
management systems claiming <acronym>SQL</acronym> standard
37
conformance were conforming at only the Entry level, since the
38
entire set of features in the Intermediate and Full levels was
39
either too voluminous or in conflict with legacy behaviors.
43
Starting with <acronym>SQL:1999</acronym>, the SQL standard defines
44
a large set of individual features rather than the ineffectively
45
broad three levels found in <acronym>SQL-92</acronym>. A large
46
subset of these features represents the <quote>Core</quote>
47
features, which every conforming SQL implementation must supply.
48
The rest of the features are purely optional. Some optional
49
features are grouped together to form <quote>packages</quote>, which
50
SQL implementations can claim conformance to, thus claiming
51
conformance to particular groups of features.
55
The <acronym>SQL:2008</acronym> and <acronym>SQL:2003</acronym>
56
standard versions are also split into a number
57
of parts. Each is known by a shorthand name. Note that these parts
58
are not consecutively numbered.
61
<listitem><para>ISO/IEC 9075-1 Framework (SQL/Framework)</para><indexterm><primary>SQL/Framework</primary></indexterm></listitem>
62
<listitem><para>ISO/IEC 9075-2 Foundation (SQL/Foundation)</para><indexterm><primary>SQL/Foundation</primary></indexterm></listitem>
63
<listitem><para>ISO/IEC 9075-3 Call Level Interface (SQL/CLI)</para><indexterm><primary>SQL/CLI</primary></indexterm></listitem>
64
<listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)</para><indexterm><primary>SQL/PSM</primary></indexterm></listitem>
65
<listitem><para>ISO/IEC 9075-9 Management of External Data (SQL/MED)</para><indexterm><primary>SQL/MED</primary></indexterm></listitem>
66
<listitem><para>ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)</para><indexterm><primary>SQL/OLB</primary></indexterm></listitem>
67
<listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (SQL/Schemata)</para><indexterm><primary>SQL/Schemata</primary></indexterm></listitem>
68
<listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)</para><indexterm><primary>SQL/JRT</primary></indexterm></listitem>
69
<listitem><para>ISO/IEC 9075-14 XML-related specifications (SQL/XML)</para><indexterm><primary>SQL/XML</primary></indexterm></listitem>
74
The <productname>PostgreSQL</productname> core covers parts 1, 2, 9,
75
11, and 14. Part 3 is covered by the ODBC driver, and part 13 is
76
covered by the PL/Java plug-in, but exact conformance is currently
77
not being verified for these components. There are currently no
78
implementations of parts 4 and 10
79
for <productname>PostgreSQL</productname>.
83
PostgreSQL supports most of the major features of SQL:2008. Out of
84
179 mandatory features required for full Core conformance,
85
PostgreSQL conforms to at least 160. In addition, there is a long
86
list of supported optional features. It might be worth noting that at
87
the time of writing, no current version of any database management
88
system claims full conformance to Core SQL:2008.
92
In the following two sections, we provide a list of those features
93
that <productname>PostgreSQL</productname> supports, followed by a
94
list of the features defined in <acronym>SQL:2008</acronym> which
95
are not yet supported in <productname>PostgreSQL</productname>.
96
Both of these lists are approximate: There might be minor details that
97
are nonconforming for a feature that is listed as supported, and
98
large parts of an unsupported feature might in fact be implemented.
99
The main body of the documentation always contains the most accurate
100
information about what does and does not work.
105
Feature codes containing a hyphen are subfeatures. Therefore, if a
106
particular subfeature is not supported, the main feature is listed
107
as unsupported even if some other subfeatures are supported.
111
<sect1 id="features-sql-standard">
112
<title>Supported Features</title>
119
<entry>Identifier</entry>
120
<entry>Package</entry>
121
<entry>Description</entry>
122
<entry>Comment</entry>
133
<sect1 id="unsupported-features-sql-standard">
134
<title>Unsupported Features</title>
137
The following features defined in <acronym>SQL:2008</acronym> are not
138
implemented in this release of
139
<productname>PostgreSQL</productname>. In a few cases, equivalent
140
functionality is available.
146
<entry>Identifier</entry>
147
<entry>Package</entry>
148
<entry>Description</entry>
149
<entry>Comment</entry>
153
&features-unsupported;