バージョンごとのドキュメント一覧

付録D SQLへの準拠

目次

D.1. サポートされている機能
D.2. サポートされていない機能
D.3. XMLの制限とSQL/XMLへの適合
D.3.1. 問い合わせはXPath 1.0に限定される
D.3.2. その他の実装の制限
<title>SQL Conformance</title>

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. 本節では、PostgreSQLがどの程度現在の標準SQLに準拠しているかについて、概要を説明します。 以下の情報は互換性についての完全な説明ではありません。 しかし、ユーザにとって十分適切かつ有用な詳細を主な話題としてここで示しています。

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. 標準SQLの公式な名称は、ISO/IEC 9075 Database Language SQLです。 この標準SQLの改訂バージョンは不定期にリリースされています。 最も最近の改訂は2023年に行われました。 この2023年版はISO/IEC 9075:2023、もしくは単にSQL:2023と呼ばれています。 この前のバージョンはSQL:2016、SQL:2011、SQL:2008、SQL:2006、SQL:2003、SQL:1999とSQL-92です。 それぞれ前のバージョンを置き換えたバージョンですので、より昔のバージョンへの適合性についての主張には公的な利点がありません。 PostgreSQLの開発では、伝統的な機能もしくは共通の考えと矛盾しないように、標準SQLの最新の公式バージョンに準拠させようとしています。 標準SQLで必須とされた機能の多くは、多少構文や機能に違いはあるものの、サポートされています。 さらに適合性を高めることが将来のリリースで期待されています。

<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. SQL-92では、適合性について、Entry、Intermediate、Fullという3つの機能セットを定義しました。 標準SQLの準拠をうたっているデータベース管理システムのほとんどは、Entryレベルのみに適合しています。 IntermediateもしくはFullレベルの機能の全体的なセットは、非常に膨大になり過ぎるか、もしくは旧来の動作と競合するからです。

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. SQL:1999から、標準SQLは、SQL-92で見受けられた3レベルに機能を非効率的に分散させるのではなく、個々の機能を大規模な集合として定義されるようになりました。 こうした機能の大規模なサブセットを、全てのSQL準拠の実装が提供しなければならないコア機能として表しています。 残りの機能は完全に省略可能です。

The standard is split into a number of parts, each also known by a shorthand name: 標準はいくつかの部分に分かれており、それぞれが省略形の名前でも知られています:

Note that some part numbers are not (or no longer) used. 部分の番号の中には使われていない(もしくは、もはや使われていない)ものがあることに注意してください。

The <productname>PostgreSQL</productname> 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 verified for these components. There are currently no implementations of parts 4, 10, 15, and 16 for <productname>PostgreSQL</productname>. PostgreSQLのコア部分は 1、2、9、11、および14番の部分に対応しています。 第3部分はODBCドライバを、そして第13部分はPL/Javaプラグインを網羅していますが、これらコンポーネントに対する正確な適合性は検証されていません。 4、10、15および16番の部分は現時点でPostgreSQLに実装されていません。

PostgreSQL supports most of the major features of SQL:2023. Out of 177 mandatory features required for full Core conformance, PostgreSQL conforms to at least 170. In addition, there is a long list of supported optional features. It might be worth noting that at the time of writing, no current version of any database management system claims full conformance to Core SQL:2023. PostgreSQLはSQL:2023の主な機能のほとんどをサポートします。 完全なコアの互換性に必要な177の必須機能の内、PostgreSQLは少なくとも170個に適合します。 さらに省略可能な機能を数多くサポートします。 本書の執筆時点で、SQL:2023のコアに完全に適合したデータベース管理システムのバージョンはないということを、ここで言及しておくのは価値のあることかもしれません。

In the following two sections, we provide a list of those features that <productname>PostgreSQL</productname> supports, followed by a list of the features defined in <acronym>SQL:2023</acronym> which are not yet supported in <productname>PostgreSQL</productname>. Both of these lists are approximate: There might be minor details that are nonconforming for a feature that is listed as supported, and large parts of an unsupported feature might in fact be implemented. The main body of the documentation always contains the most accurate information about what does and does not work. 以下の2つの節では、PostgreSQLでサポートされているこれらの機能をリストし、その後にPostgreSQLでまだサポートされていないSQL:2023で定義された機能をリストしています。 これら2つのリストはおおよそのものです。 サポート対象であるとリストされている機能が些細な部分で準拠していない可能性があり、サポートされていないある機能の大部分が、実際には実装されている可能性があります。 本書の主要な部分では、動作するものとしないものについての最も正確な情報を常に伝えます。

注記

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. ハイフンを含む機能コードはサブ機能です。 したがって、特定のサブ機能がサポートされない場合、他のサブ機能がサポートされていてもそのメイン機能はサポートされない機能としてリストされています。