<!-- doc/src/sgml/features.sgml -->
<appendix id="features">
<title>SQL Conformance</title>
<para>
This section attempts to outline to what extent
<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>
<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
from time to time; the most recent update appearing in 2023.
The 2023 version is referred to as ISO/IEC 9075:2023, or simply as SQL:2023.
The versions prior to that were SQL:2016, SQL:2011, SQL:2008, SQL:2006, SQL:2003,
SQL:1999, and SQL-92. Each version
replaces the previous one, so claims of conformance to earlier
versions have no official merit.
<productname>PostgreSQL</productname> development aims for
conformance with the latest official version of the standard where
such conformance does not contradict traditional features or common
sense. 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.
</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.
</para>
<para>
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.
</para>
<para>
The standard is split into a number of parts, each also known by a shorthand
name:
<itemizedlist>
<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>
<listitem><para>ISO/IEC 9075-15 Multi-dimensional arrays (SQL/MDA)</para><indexterm><primary>SQL/MDA</primary></indexterm></listitem>
<listitem><para>ISO/IEC 9075-16 Property Graph Queries (SQL/PGQ)</para><indexterm><primary>SQL/PGQ</primary></indexterm></listitem>
</itemizedlist>
Note that some part numbers are not (or no longer) used.
</para>
<para>
The <productname>PostgreSQL</productname> core covers parts 1, 2, 9,
11, and 14. Part 3 is covered by the ODBC driver, and part