2007-02-03 18:59:36 +01:00
|
|
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.27 2007/02/03 17:59:35 petere Exp $ -->
|
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
|
2007-02-03 18:59:36 +01:00
|
|
|
from time to time; the most recent full update appearing in 2003,
|
|
|
|
with a partial update appearing in 2006. The 2003 version is
|
|
|
|
referred to as ISO/IEC 9075:2003, or simply as SQL:2003. The
|
|
|
|
versions prior to that were 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>
|
2004-11-27 22:27:08 +01:00
|
|
|
The <acronym>SQL:2003</acronym> standard is also split into a number
|
|
|
|
of parts. Each is known by a shorthand name. Note that these parts
|
|
|
|
are not consecutively numbered.
|
|
|
|
|
|
|
|
<itemizedlist>
|
2007-02-03 18:59:36 +01:00
|
|
|
<listitem><para>ISO/IEC 9075-1 Framework (SQL/Framework)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-2 Foundation (SQL/Foundation)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-3 Call Level Interface (SQL/CLI)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-9 Management of External Data (SQL/MED)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (SQL/Schemata)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)</para></listitem>
|
|
|
|
<listitem><para>ISO/IEC 9075-14 XML-related specifications (SQL/XML)</para></listitem>
|
2004-11-27 22:27:08 +01:00
|
|
|
</itemizedlist>
|
2002-11-17 14:28:43 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2007-02-03 18:59:36 +01:00
|
|
|
<productname>PostgreSQL</productname> covers parts 1, 2, 11, and 14.
|
2002-11-17 14:28:43 +01:00
|
|
|
Part 3 is similar to the ODBC interface, and part 4 is similar to
|
|
|
|
the <application>PL/pgSQL</application> programming language, but
|
2004-11-27 22:27:08 +01:00
|
|
|
exact conformance is not specifically intended or verified in either
|
|
|
|
case.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
PostgreSQL supports most of the major features of SQL:2003. Out of
|
|
|
|
164 mandatory features required for full Core conformance,
|
|
|
|
PostgreSQL conforms to at least 150. 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
|
|
|
|
system claims full conformance to Core SQL:2003.
|
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
|
2004-11-27 22:27:08 +01:00
|
|
|
list of the features defined in <acronym>SQL:2003</acronym> which
|
|
|
|
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>
|
2004-11-27 22:27:08 +01:00
|
|
|
The following features defined in <acronym>SQL:2003</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>
|