2010-09-20 22:08:53 +02:00
<!-- doc/src/sgml/features.sgml -->
2002-06-15 05:00:09 +02:00
2002-11-17 14:28:43 +01:00
<appendix id="features">
<title>SQL Conformance</title>
2002-06-15 05:00:09 +02:00
2002-11-17 14:28:43 +01:00
<para>
This section attempts to outline to what extent
2004-11-27 22:27:08 +01:00
<productname>PostgreSQL</productname> conforms to the current SQL
standard. The following information is not a full statement of
conformance, but it presents the main topics in as much detail as is
both reasonable and useful for users.
</para>
2002-06-15 05:00:09 +02:00
2002-11-17 14:28:43 +01:00
<para>
The formal name of the SQL standard is ISO/IEC 9075 <quote>Database
Language SQL</quote>. A revised version of the standard is released
2008-10-18 02:35:32 +02:00
from time to time; the most recent update appearing in 2008.
The 2008 version is referred to as ISO/IEC 9075:2008, or simply as SQL:2008.
The versions prior to that were SQL:2003, SQL:1999, and SQL-92. Each version
2004-11-27 22:27:08 +01:00
replaces the previous one, so claims of conformance to earlier
versions have no official merit.
<productname>PostgreSQL</productname> development aims for
2002-11-17 14:28:43 +01:00
conformance with the latest official version of the standard where
such conformance does not contradict traditional features or common
2007-02-03 18:59:36 +01:00
sense. The PostgreSQL project is not represented in the ISO/IEC
9075 Working Group during the preparation of the SQL standard
releases, but even so, many of the features required by the SQL
standard are supported, though sometimes with slightly differing
syntax or function. Further moves towards conformance can be
expected over time.
2004-11-27 22:27:08 +01:00
</para>
<para>
<acronym>SQL-92</acronym> defined three feature sets for
conformance: Entry, Intermediate, and Full. Most database
management systems claiming <acronym>SQL</acronym> standard
conformance were conforming at only the Entry level, since the
entire set of features in the Intermediate and Full levels was
either too voluminous or in conflict with legacy behaviors.
2002-11-17 14:28:43 +01:00
</para>
<para>
2004-11-27 22:27:08 +01:00
Starting with <acronym>SQL:1999</acronym>, the SQL standard defines
a large set of individual features rather than the ineffectively
broad three levels found in <acronym>SQL-92</acronym>. A large
subset of these features represents the <quote>Core</quote>
features, which every conforming SQL implementation must supply.
The rest of the features are purely optional. Some optional
features are grouped together to form <quote>packages</quote>, which
SQL implementations can claim conformance to, thus claiming
conformance to particular groups of features.
2002-11-17 14:28:43 +01:00
</para>
<para>
2008-10-18 02:35:32 +02:00
The <acronym>SQL:2008</acronym> and <acronym>SQL:2003</acronym>
standard versions are also split into a number
2004-11-27 22:27:08 +01:00
of parts. Each is known by a shorthand name. Note that these parts
are not consecutively numbered.
<itemizedlist>
2008-11-27 13:12:02 +01:00
<listitem><para>ISO/IEC 9075-1 Framework (SQL/Framework)</para><indexterm><primary>SQL/Framework</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-2 Foundation (SQL/Foundation)</para><indexterm><primary>SQL/Foundation</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-3 Call Level Interface (SQL/CLI)</para><indexterm><primary>SQL/CLI</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)</para><indexterm><primary>SQL/PSM</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-9 Management of External Data (SQL/MED)</para><indexterm><primary>SQL/MED</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)</para><indexterm><primary>SQL/OLB</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (SQL/Schemata)</para><indexterm><primary>SQL/Schemata</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)</para><indexterm><primary>SQL/JRT</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-14 XML-related specifications (SQL/XML)</para><indexterm><primary>SQL/XML</primary></indexterm></listitem>
2004-11-27 22:27:08 +01:00
</itemizedlist>
2002-11-17 14:28:43 +01:00
</para>
<para>
2008-12-19 17:25:19 +01:00
The <productname>PostgreSQL</productname> core covers parts 1, 2, 9,
2008-11-27 13:12:02 +01:00
11, and 14. Part 3 is covered by the ODBC driver, and part 13 is
covered by the PL/Java plug-in, but exact conformance is currently
not being verified for these components. There are currently no
2008-12-19 17:25:19 +01:00
implementations of parts 4 and 10
2008-11-27 13:12:02 +01:00
for <productname>PostgreSQL</productname>.
2004-11-27 22:27:08 +01:00
</para>
<para>
2008-10-18 02:35:32 +02:00
PostgreSQL supports most of the major features of SQL:2008. Out of
179 mandatory features required for full Core conformance,
PostgreSQL conforms to at least 160. In addition, there is a long
Update documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:
may - permission, "You may borrow my rake."
can - ability, "I can lift that log."
might - possibility, "It might rain today."
Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice. Similarly, "It may crash" is better stated, "It might crash".
Also update two error messages mentioned in the documenation to match.
2007-01-31 21:56:20 +01:00
list of supported optional features. It might be worth noting that at
2004-11-27 22:27:08 +01:00
the time of writing, no current version of any database management
2008-10-18 02:35:32 +02:00
system claims full conformance to Core SQL:2008.
2002-11-17 14:28:43 +01:00
</para>
<para>
In the following two sections, we provide a list of those features
that <productname>PostgreSQL</productname> supports, followed by a
2008-10-18 02:35:32 +02:00
list of the features defined in <acronym>SQL:2008</acronym> which
2004-11-27 22:27:08 +01:00
are not yet supported in <productname>PostgreSQL</productname>.
Update documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:
may - permission, "You may borrow my rake."
can - ability, "I can lift that log."
might - possibility, "It might rain today."
Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice. Similarly, "It may crash" is better stated, "It might crash".
Also update two error messages mentioned in the documenation to match.
2007-01-31 21:56:20 +01:00
Both of these lists are approximate: There might be minor details that
2004-11-27 22:27:08 +01:00
are nonconforming for a feature that is listed as supported, and
Update documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:
may - permission, "You may borrow my rake."
can - ability, "I can lift that log."
might - possibility, "It might rain today."
Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice. Similarly, "It may crash" is better stated, "It might crash".
Also update two error messages mentioned in the documenation to match.
2007-01-31 21:56:20 +01:00
large parts of an unsupported feature might in fact be implemented.
2004-11-27 22:27:08 +01:00
The main body of the documentation always contains the most accurate
information about what does and does not work.
2002-11-17 14:28:43 +01:00
</para>
<note>
2002-06-22 04:04:55 +02:00
<para>
2002-11-17 14:28:43 +01:00
Feature codes containing a hyphen are subfeatures. Therefore, if a
particular subfeature is not supported, the main feature is listed
as unsupported even if some other subfeatures are supported.
2002-06-22 04:04:55 +02:00
</para>
2002-11-17 14:28:43 +01:00
</note>
2002-06-15 05:00:09 +02:00
2004-11-27 22:27:08 +01:00
<sect1 id="features-sql-standard">
2002-06-22 04:04:55 +02:00
<title>Supported Features</title>
2002-06-15 05:00:09 +02:00
2002-06-19 08:11:36 +02:00
<para>
2002-06-15 05:00:09 +02:00
<informaltable>
2002-11-17 14:28:43 +01:00
<tgroup cols="4">
2002-06-15 05:00:09 +02:00
<thead>
<row>
<entry>Identifier</entry>
2002-11-17 14:28:43 +01:00
<entry>Package</entry>
2002-06-15 05:00:09 +02:00
<entry>Description</entry>
<entry>Comment</entry>
</row>
</thead>
2003-01-15 22:55:52 +01:00
&features-supported;
</tgroup>
</informaltable>
</para>
</sect1>
2004-11-27 22:27:08 +01:00
<sect1 id="unsupported-features-sql-standard">
2003-01-15 22:55:52 +01:00
<title>Unsupported Features</title>
<para>
2008-10-18 02:35:32 +02:00
The following features defined in <acronym>SQL:2008</acronym> are not
2003-03-13 02:30:29 +01:00
implemented in this release of
2003-01-15 22:55:52 +01:00
<productname>PostgreSQL</productname>. In a few cases, equivalent
functionality is available.
<informaltable>
<tgroup cols="4">
<thead>
2003-01-15 22:44:35 +01:00
<row>
2003-01-15 22:55:52 +01:00
<entry>Identifier</entry>
<entry>Package</entry>
<entry>Description</entry>
<entry>Comment</entry>
2003-01-15 22:44:35 +01:00
</row>
2003-01-15 22:55:52 +01:00
</thead>
&features-unsupported;
2002-06-15 05:00:09 +02:00
</tgroup>
</informaltable>
</para>
</sect1>
2002-11-17 14:28:43 +01:00
2002-06-15 05:00:09 +02:00
</appendix>