codekingpro/portable-devtools
115k
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix D. SQL Conformance</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words" /><link rel="next" href="features-sql-standard.html" title="D.1. Supported Features" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Appendix D. SQL Conformance</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="appendixes.html" title="Part VIII. Appendixes">Up</a></td><th width="60%" align="center">Part VIII. Appendixes</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="features-sql-standard.html" title="D.1. Supported Features">Next</a></td></tr></table><hr /></div><div class="appendix" id="FEATURES"><div class="titlepage"><div><div><h2 class="title">Appendix D. SQL Conformance</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="features-sql-standard.html">D.1. Supported Features</a></span></dt><dt><span class="sect1"><a href="unsupported-features-sql-standard.html">D.2. Unsupported Features</a></span></dt><dt><span class="sect1"><a href="xml-limits-conformance.html">D.3. XML Limits and Conformance to SQL/XML</a></span></dt><dd><dl><dt><span class="sect2"><a href="xml-limits-conformance.html#FUNCTIONS-XML-LIMITS-XPATH1">D.3.1. Queries Are Restricted to XPath 1.0</a></span></dt><dt><span class="sect2"><a href="xml-limits-conformance.html#FUNCTIONS-XML-LIMITS-POSTGRESQL">D.3.2. Incidental Limits of the Implementation</a></span></dt></dl></dd></dl></div><p>3 This section attempts to outline to what extent4 <span class="productname">PostgreSQL</span> conforms to the current SQL5 standard. The following information is not a full statement of6 conformance, but it presents the main topics in as much detail as is7 both reasonable and useful for users.8 </p><p>9 The formal name of the SQL standard is ISO/IEC 9075 <span class="quote">“<span class="quote">Database10 Language SQL</span>”</span>. A revised version of the standard is released11 from time to time; the most recent update appearing in 2023.12 The 2023 version is referred to as ISO/IEC 9075:2023, or simply as SQL:2023.13 The versions prior to that were SQL:2016, SQL:2011, SQL:2008, SQL:2006, SQL:2003,14 SQL:1999, and SQL-92. Each version15 replaces the previous one, so claims of conformance to earlier16 versions have no official merit.17 <span class="productname">PostgreSQL</span> development aims for18 conformance with the latest official version of the standard where19 such conformance does not contradict traditional features or common20 sense. Many of the features required by the SQL21 standard are supported, though sometimes with slightly differing22 syntax or function. Further moves towards conformance can be23 expected over time.24 </p><p>25 <acronym class="acronym">SQL-92</acronym> defined three feature sets for26 conformance: Entry, Intermediate, and Full. Most database27 management systems claiming <acronym class="acronym">SQL</acronym> standard28 conformance were conforming at only the Entry level, since the29 entire set of features in the Intermediate and Full levels was30 either too voluminous or in conflict with legacy behaviors.31 </p><p>32 Starting with <acronym class="acronym">SQL:1999</acronym>, the SQL standard defines33 a large set of individual features rather than the ineffectively34 broad three levels found in <acronym class="acronym">SQL-92</acronym>. A large35 subset of these features represents the <span class="quote">“<span class="quote">Core</span>”</span>36 features, which every conforming SQL implementation must supply.37 The rest of the features are purely optional.38 </p><p>39 The standard is split into a number of parts, each also known by a shorthand40 name:41 42 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>ISO/IEC 9075-1 Framework (SQL/Framework)</p><a id="id-1.11.5.6.1.1.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-2 Foundation (SQL/Foundation)</p><a id="id-1.11.5.6.1.2.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-3 Call Level Interface (SQL/CLI)</p><a id="id-1.11.5.6.1.3.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-4 Persistent Stored Modules (SQL/PSM)</p><a id="id-1.11.5.6.1.4.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-9 Management of External Data (SQL/MED)</p><a id="id-1.11.5.6.1.5.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-10 Object Language Bindings (SQL/OLB)</p><a id="id-1.11.5.6.1.6.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-11 Information and Definition Schemas (SQL/Schemata)</p><a id="id-1.11.5.6.1.7.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-13 Routines and Types using the Java Language (SQL/JRT)</p><a id="id-1.11.5.6.1.8.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-14 XML-related specifications (SQL/XML)</p><a id="id-1.11.5.6.1.9.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-15 Multi-dimensional arrays (SQL/MDA)</p><a id="id-1.11.5.6.1.10.2" class="indexterm"></a></li><li class="listitem"><p>ISO/IEC 9075-16 Property Graph Queries (SQL/PGQ)</p><a id="id-1.11.5.6.1.11.2" class="indexterm"></a></li></ul></div><p>43 44 Note that some part numbers are not (or no longer) used.45 </p><p>46 The <span class="productname">PostgreSQL</span> core covers parts 1, 2, 9,47 11, and 14. Part 3 is covered by the ODBC driver, and part 13 is48 covered by the PL/Java plug-in, but exact conformance is currently49 not being verified for these components. There are currently no50 implementations of parts 4, 10, 15, and 1651 for <span class="productname">PostgreSQL</span>.52 </p><p>53 PostgreSQL supports most of the major features of SQL:2023. Out of54 177 mandatory features required for full Core conformance,55 PostgreSQL conforms to at least 170. In addition, there is a long56 list of supported optional features. It might be worth noting that at57 the time of writing, no current version of any database management58 system claims full conformance to Core SQL:2023.59 </p><p>60 In the following two sections, we provide a list of those features61 that <span class="productname">PostgreSQL</span> supports, followed by a62 list of the features defined in <acronym class="acronym">SQL:2023</acronym> which63 are not yet supported in <span class="productname">PostgreSQL</span>.64 Both of these lists are approximate: There might be minor details that65 are nonconforming for a feature that is listed as supported, and66 large parts of an unsupported feature might in fact be implemented.67 The main body of the documentation always contains the most accurate68 information about what does and does not work.69 </p><div class="note"><h3 class="title">Note</h3><p>70 Feature codes containing a hyphen are subfeatures. Therefore, if a71 particular subfeature is not supported, the main feature is listed72 as unsupported even if some other subfeatures are supported.73 </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendixes.html" title="Part VIII. Appendixes">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="features-sql-standard.html" title="D.1. Supported Features">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. <acronym class="acronym">SQL</acronym> Key Words </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> D.1. Supported Features</td></tr></table></div></body></html>