Appendix D. SQL Conformance
This section attempts to outline to what extent PostgreSQL conforms to the current SQL standard.
The following informationis nota full statement of conformance, but it presents the main topics in as
much detail as is both reasonable and useful for users.
The formal name of the SQL standard is ISO/IEC 9075 “Database Language SQL”. A revised ver-
sion of the standard is released from time to time; the most recent update appearing in 2011. The
2011 version is referred to as ISO/IEC 9075:2011, or simply as SQL:2011. The versions prior to
that were SQL:2008, SQL:2003, SQL:1999, and SQL-92. Each version replaces the previous one,
so claims of conformance to earlier versions have no ofﬁcial merit. PostgreSQL development aims
for conformance with the latest ofﬁcial 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.
SQL-92 deﬁned three feature sets for conformance: Entry, Intermediate, and Full. Most database
management systems claiming SQL 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
conﬂict with legacy behaviors.
Starting withSQL:1999, the SQL standarddeﬁnes a large setof individual features rather than the in-
effectively broad three levels found in SQL-92. A large subset of these features represents the “Core”
features, whicheveryconformingSQL implementationmustsupply. The restof the featuresarepurely
optional. Some optional features are grouped together to form “packages”, which SQL implementa-
tions can claim conformance to, thus claiming conformance to particular groups of features.
The standard versions beginning with SQL:2003 are also split into a number of parts. Each is known
by a shorthand name. Note that these parts are not consecutively numbered.
ISO/IEC 9075-1 Framework (SQL/Framework)
ISO/IEC 9075-2 Foundation (SQL/Foundation)
ISO/IEC 9075-3 Call Level Interface (SQL/CLI)
ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)
ISO/IEC 9075-9 Management of External Data (SQL/MED)
ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)
ISO/IEC 9075-11 Information and Deﬁnition Schemas (SQL/Schemata)
ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)
ISO/IEC 9075-14 XML-relatedspeciﬁcations (SQL/XML)
The PostgreSQL core covers parts 1, 2, 9, 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 veriﬁed for these
components. There are currently no implementations of parts 4 and 10 for PostgreSQL.
PostgreSQL supportsmostofthemajor featuresof SQL:2011. Outof 179mandatoryfeatures required
for full Core conformance, PostgreSQL conforms to at least 160. In addition, there is a long list of