Appendix D. SQL Conformance

This section attempts to outline to what extent
PostgreSQL conforms to the SQL standard.
Full compliance to the standard or a complete statement about the
compliance to the standard is complicated and not particularly
useful, so this section can only give an overview.

The formal name of the SQL standard is ISO/IEC 9075 "Database
Language SQL". A revised version of the standard is released
from time to time; the most recent one appearing in 1999. That
version is referred to as ISO/IEC 9075:1999, or informally as SQL99.
The version prior to that was SQL92.
PostgreSQL development tends to aim for
conformance with the latest official version of the standard where
such conformance does not contradict traditional features or common
sense. At the time of this writing, balloting is under way for a
new revision of the standard, which, if approved, will eventually
become the conformance target for future
PostgreSQL development.

SQL92 defined 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
conflict with legacy behaviors.

SQL99 defines a large set of individual features
rather than the ineffectively broad three levels found in
SQL92. A large subset of these features
represents the "core" features, which every conforming
SQL implementation must supply. The rest of the features are purely
optional. Some optional features are grouped together to form
"packages", which SQL implementations can claim
conformance to, thus claiming conformance to particular groups of
features.

The SQL99 standard is also split into 5 parts:
Framework, Foundation, Call Level Interface, Persistent Stored
Modules, and Host Language Bindings.
PostgreSQL only covers parts 1, 2, and 5.
Part 3 is similar to the ODBC interface, and part 4 is similar to
the PL/pgSQL programming language, but
exact conformance is not specifically intended in either case.

In the following two sections, we provide a list of those features
that PostgreSQL supports, followed by a
list of the features defined in SQL99 which are not yet supported in
PostgreSQL. Both of these lists are
approximate: There may be minor details that are nonconforming for a
feature that is listed as supported, and large parts of an
unsupported feature may in fact be implemented. The main body of
the documentation always contains the most accurate information
about what does and does not work.

Note: 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.