Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49cbef7

Browse files
committed
Update of conformance information to SQL:2003
by Troels Arvin, Simon Riggs, Elein MustainMake spelling of SQL standard names uniform.
1 parent90c3ebe commit49cbef7

26 files changed

+302
-202
lines changed

‎doc/src/sgml/array.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.39 2004/11/15 06:32:13 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/array.sgml,v 1.40 2004/11/27 21:27:05 petere Exp $ -->
22

33
<sect1 id="arrays">
44
<title>Arrays</title>
@@ -63,8 +63,10 @@ CREATE TABLE tictactoe (
6363
</para>
6464

6565
<para>
66-
An alternative, SQL99-standard syntax may be used for one-dimensional arrays.
67-
<structfield>pay_by_quarter</structfield> could have been defined as:
66+
An alternative syntax, which conforms to the SQL:1999 standard, may
67+
be used for one-dimensional arrays.
68+
<structfield>pay_by_quarter</structfield> could have been defined
69+
as:
6870
<programlisting>
6971
pay_by_quarter integer ARRAY[4],
7072
</programlisting>

‎doc/src/sgml/datatype.sgml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.150 2004/09/20 22:48:25 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.151 2004/11/27 21:27:05 petere Exp $
33
-->
44

55
<chapter id="datatype">
@@ -1744,9 +1744,20 @@ January 8 04:05:06 1999 PST
17441744
</para>
17451745

17461746
<para>
1747-
For <type>timestamp [without time zone]</type>, any explicit time
1748-
zone specified in the input is silently ignored. That is, the
1749-
resulting date/time value is derived from the explicit date/time
1747+
The <acronym>SQL</acronym> standard differentiates <type>timestamp without time zone</type>
1748+
and <type>timestamp with time zone</type> literals by the existence of a
1749+
<quote>+</quote>; or <quote>-</quote>. Hence, according to the standard,
1750+
<programlisting>TIMESTAMP '2004-10-19 10:23:54'</programlisting>
1751+
is a <type>timestamp without time zone</type>, while
1752+
<programlisting>TIMESTAMP '2004-10-19 10:23:54+02'</programlisting>
1753+
is a <type>timestamp with time zone</type>.
1754+
<productname>PostgreSQL</productname>
1755+
differs from the standard by requiring that <type>timestamp with time zone</type>
1756+
literals be explicitly typed:
1757+
<programlisting>TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'</programlisting>
1758+
If a literal is not explicitly indicated as being of <type>timestamp with time zone</type>,
1759+
PostgreSQL will silently ignore any time zone indication in the literal.
1760+
That is, the resulting date/time value is derived from the date/time
17501761
fields in the input value, and is not adjusted for time zone.
17511762
</para>
17521763

‎doc/src/sgml/ddl.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.32 2004/11/15 06:32:13 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.33 2004/11/27 21:27:06 petere Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -1069,7 +1069,7 @@ SELECT name, altitude
10691069
<para>
10701070
In previous versions of <productname>PostgreSQL</productname>, the
10711071
default behavior was not to include child tables in queries. This was
1072-
found to be error prone and is also in violation of theSQL99
1072+
found to be error prone and is also in violation of theSQL:1999
10731073
standard. Under the old syntax, to get the sub-tables you append
10741074
<literal>*</literal> to the table name.
10751075
For example

‎doc/src/sgml/errcodes.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/errcodes.sgml,v 1.10 2004/11/15 06:32:13 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/errcodes.sgml,v 1.11 2004/11/27 21:27:06 petere Exp $ -->
22

33
<appendix id="errcodes-appendix">
44
<title><productname>PostgreSQL</productname> Error Codes</title>
@@ -125,7 +125,7 @@
125125

126126
<row>
127127
<entry>Class 02</entry>
128-
<entry>No Data &mdash; this is also a warning class perSQL99</entry>
128+
<entry>No Data &mdash; this is also a warning class perSQL:1999</entry>
129129
</row>
130130

131131
<row>

‎doc/src/sgml/features.sgml

Lines changed: 72 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,102 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003/11/29 19:51:37 pgsql Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.23 2004/11/27 21:27:06 petere Exp $
33
-->
44

55
<appendix id="features">
66
<title>SQL Conformance</title>
77

88
<para>
99
This section attempts to outline to what extent
10-
<productname>PostgreSQL</productname> conforms to theSQL standard.
11-
Full compliance to the standard or a complete statementabout the
12-
compliance tothestandard is complicated and not particularly
13-
useful, so this section can only give an overview.
14-
</para>
10+
<productname>PostgreSQL</productname> conforms to thecurrent SQL
11+
standard. The following information is not a full statementof
12+
conformance, but it presentsthemain topics in as much detail as is
13+
both reasonable and useful for users.
14+
</para>
1515

1616
<para>
1717
The formal name of the SQL standard is ISO/IEC 9075 <quote>Database
1818
Language SQL</quote>. A revised version of the standard is released
19-
from time to time; the most recent one appearing in 1999. That
20-
version is referred to as ISO/IEC 9075:1999, or informally as SQL99.
21-
The version prior to that was SQL92.
22-
<productname>PostgreSQL</productname> development tends to aim for
19+
from time to time; the most recent one appearing in late 2003. That
20+
version is referred to as ISO/IEC 9075:2003, or simply as SQL:2003.
21+
The versions prior to that were SQL:1999 and SQL-92. Each version
22+
replaces the previous one, so claims of conformance to earlier
23+
versions have no official merit.
24+
<productname>PostgreSQL</productname> development aims for
2325
conformance with the latest official version of the standard where
2426
such conformance does not contradict traditional features or common
25-
sense. At the time of this writing, balloting is under way for a
26-
new revision of the standard, which, if approved, will eventually
27-
become the conformance target for future
28-
<productname>PostgreSQL</productname> development.
27+
sense. The PostgreSQL project was not represented in the ISO/IEC
28+
9075 Working Group during the preparation of SQL:2003. Even so,
29+
many of the features required by SQL:2003 are already supported,
30+
though sometimes with slightly differing syntax or function.
31+
Further moves towards conformance may be expected in later releases.
32+
</para>
33+
34+
<para>
35+
<acronym>SQL-92</acronym> defined three feature sets for
36+
conformance: Entry, Intermediate, and Full. Most database
37+
management systems claiming <acronym>SQL</acronym> standard
38+
conformance were conforming at only the Entry level, since the
39+
entire set of features in the Intermediate and Full levels was
40+
either too voluminous or in conflict with legacy behaviors.
2941
</para>
3042

3143
<para>
32-
<acronym>SQL92</acronym> defined three feature sets for conformance:
33-
Entry, Intermediate, and Full. Most database management systems claiming
34-
<acronym>SQL</acronym> standard conformance were conforming at only
35-
the Entry level, since the entire set of features in the
36-
Intermediate and Full levels was either too voluminous or in
37-
conflict with legacy behaviors.
44+
Starting with <acronym>SQL:1999</acronym>, the SQL standard defines
45+
a large set of individual features rather than the ineffectively
46+
broad three levels found in <acronym>SQL-92</acronym>. A large
47+
subset of these features represents the <quote>Core</quote>
48+
features, which every conforming SQL implementation must supply.
49+
The rest of the features are purely optional. Some optional
50+
features are grouped together to form <quote>packages</quote>, which
51+
SQL implementations can claim conformance to, thus claiming
52+
conformance to particular groups of features.
3853
</para>
3954

4055
<para>
41-
<acronym>SQL99</acronym> defines a large set of individual features
42-
rather than the ineffectively broad three levels found in
43-
<acronym>SQL92</acronym>. A large subset of these features
44-
represents the <quote>core</quote> features, which every conforming
45-
SQL implementation must supply. The rest of the features are purely
46-
optional. Some optional features are grouped together to form
47-
<quote>packages</quote>, which SQL implementations can claim
48-
conformance to, thus claiming conformance to particular groups of
49-
features.
56+
The <acronym>SQL:2003</acronym> standard is also split into a number
57+
of parts. Each is known by a shorthand name. Note that these parts
58+
are not consecutively numbered.
59+
60+
<itemizedlist>
61+
<listitem><para>ISO/IEC 9075-1 Framework (<acronym>SQL/Framework</acronym>)</para></listitem>
62+
<listitem><para>ISO/IEC 9075-2 Foundation (<acronym>SQL/Foundation</acronym>)</para></listitem>
63+
<listitem><para>ISO/IEC 9075-3 Call Level Interface (<acronym>SQL/CLI</acronym>)</para></listitem>
64+
<listitem><para>ISO/IEC 9075-4 Persistent Stored Modules (<acronym>SQL/PSM</acronym>)</para></listitem>
65+
<listitem><para>ISO/IEC 9075-9 Management of External Data (<acronym>SQL/MED</acronym>)</para></listitem>
66+
<listitem><para>ISO/IEC 9075-10 Object Language Bindings (<acronym>SQL/OLB</acronym>)</para></listitem>
67+
<listitem><para>ISO/IEC 9075-11 Information and Definition Schemas (<acronym>SQL/Schemata</acronym>)</para></listitem>
68+
<listitem><para>ISO/IEC 9075-13 Routines and Types using the Java Language (<acronym>SQL/JRT</acronym>)</para></listitem>
69+
<listitem><para>ISO/IEC 9075-14 XML-related specifications (<acronym>SQL/XML</acronym>)</para></listitem>
70+
</itemizedlist>
5071
</para>
5172

5273
<para>
53-
The <acronym>SQL99</acronym> standard is also split into 5 parts:
54-
Framework, Foundation, Call Level Interface, Persistent Stored
55-
Modules, and Host Language Bindings.
56-
<productname>PostgreSQL</productname> only covers parts 1, 2, and 5.
74+
<productname>PostgreSQL</productname> covers parts 1, 2, and 11.
5775
Part 3 is similar to the ODBC interface, and part 4 is similar to
5876
the <application>PL/pgSQL</application> programming language, but
59-
exact conformance is not specifically intended in either case.
77+
exact conformance is not specifically intended or verified in either
78+
case.
79+
</para>
80+
81+
<para>
82+
PostgreSQL supports most of the major features of SQL:2003. Out of
83+
164 mandatory features required for full Core conformance,
84+
PostgreSQL conforms to at least 150. In addition, there is a long
85+
list of supported optional features. It may be worth noting that at
86+
the time of writing, no current version of any database management
87+
system claims full conformance to Core SQL:2003.
6088
</para>
6189

6290
<para>
6391
In the following two sections, we provide a list of those features
6492
that <productname>PostgreSQL</productname> supports, followed by a
65-
list of the features defined inSQL99 which are not yet supported in
66-
<productname>PostgreSQL</productname>. Both of these lists are
67-
approximate: There may be minor details that are nonconforming for a
68-
feature that is listed as supported, and large parts of an
69-
unsupported feature may in fact be implemented. The main body of
70-
the documentation always contains the most accurate information
71-
about what does and does not work.
93+
list of the features defined in<acronym>SQL:2003</acronym> which
94+
are not yet supported in<productname>PostgreSQL</productname>.
95+
Both of these lists areapproximate: There may be minor details that
96+
are nonconforming for afeature that is listed as supported, and
97+
large parts of anunsupported feature may in fact be implemented.
98+
The main body ofthe documentation always contains the most accurate
99+
informationabout what does and does not work.
72100
</para>
73101

74102
<note>
@@ -79,7 +107,7 @@ $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003/11/29 19:51:37 pgsql E
79107
</para>
80108
</note>
81109

82-
<sect1 id="features-sql99">
110+
<sect1 id="features-sql-standard">
83111
<title>Supported Features</title>
84112

85113
<para>
@@ -101,11 +129,11 @@ $PostgreSQL: pgsql/doc/src/sgml/features.sgml,v 2.22 2003/11/29 19:51:37 pgsql E
101129
</para>
102130
</sect1>
103131

104-
<sect1 id="unsupported-features-sql99">
132+
<sect1 id="unsupported-features-sql-standard">
105133
<title>Unsupported Features</title>
106134

107135
<para>
108-
The following features defined in <acronym>SQL99</acronym> are not
136+
The following features defined in <acronym>SQL:2003</acronym> are not
109137
implemented in this release of
110138
<productname>PostgreSQL</productname>. In a few cases, equivalent
111139
functionality is available.

‎doc/src/sgml/func.sgml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.223 2004/11/15 06:32:13 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.224 2004/11/27 21:27:06 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -2479,16 +2479,15 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
24792479
</indexterm>
24802480

24812481
<para>
2482-
There are three separate approaches to pattern matching provided by
2483-
<productname>PostgreSQL</productname>: the traditional
2484-
<acronym>SQL</acronym>
2485-
<function>LIKE</function> operator, the more recent
2486-
<acronym>SQL99</acronym>
2487-
<function>SIMILAR TO</function> operator, and
2488-
<acronym>POSIX</acronym>-style regular expressions.
2482+
There are three separate approaches to pattern matching provided
2483+
by <productname>PostgreSQL</productname>: the traditional
2484+
<acronym>SQL</acronym> <function>LIKE</function> operator, the
2485+
more recent <literal>>SIMILAR TO</literal> operator (since
2486+
SQL:1999), and <acronym>POSIX</acronym>-style regular expressions.
24892487
Additionally, a pattern matching function,
24902488
<function>substring</function>, is available, using either
2491-
<acronym>SQL99</acronym>-style or POSIX-style regular expressions.
2489+
<literal>SIMILAR TO</literal>-style or POSIX-style regular
2490+
expressions.
24922491
</para>
24932492

24942493
<tip>
@@ -2595,11 +2594,10 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
25952594
</sect2>
25962595

25972596

2598-
<sect2 id="functions-sql99-regexp">
2599-
<title><function>SIMILAR TO</function> and <acronym>SQL99</acronym>
2600-
Regular Expressions</title>
2597+
<sect2 id="functions-similarto-regexp">
2598+
<title><function>SIMILAR TO</function> Regular Expressions</title>
26012599

2602-
<indexterm zone="functions-sql99-regexp">
2600+
<indexterm zone="functions-similarto-regexp">
26032601
<primary>regular expression</primary>
26042602
<!-- <seealso>pattern matching</seealso> breaks index build -->
26052603
</indexterm>
@@ -2618,14 +2616,13 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
26182616
</synopsis>
26192617

26202618
<para>
2621-
The <function>SIMILAR TO</function> operator returns true or false
2622-
depending on whether its pattern matches the given string. It is
2623-
much like <function>LIKE</function>, except that it interprets the
2624-
pattern using <acronym>SQL99</acronym>'s definition of a regular
2625-
expression.
2626-
<acronym>SQL99</acronym>'s regular expressions are a curious cross
2627-
between <function>LIKE</function> notation and common regular expression
2628-
notation.
2619+
The <function>SIMILAR TO</function> operator returns true or
2620+
false depending on whether its pattern matches the given string.
2621+
It is much like <function>LIKE</function>, except that it
2622+
interprets the pattern using the SQL standard's definition of a
2623+
regular expression. SQL regular expressions are a curious cross
2624+
between <function>LIKE</function> notation and common regular
2625+
expression notation.
26292626
</para>
26302627

26312628
<para>
@@ -2704,7 +2701,7 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
27042701
<function>substring(<parameter>string</parameter> from
27052702
<replaceable>pattern</replaceable> for
27062703
<replaceable>escape-character</replaceable>)</function>, provides
2707-
extraction of a substring that matchesa <acronym>SQL99</acronym>
2704+
extraction of a substring that matchesan SQL
27082705
regular expression pattern. As with <literal>SIMILAR TO</>, the
27092706
specified pattern must match to the entire data string, else the
27102707
function fails and returns null. To indicate the part of the

‎doc/src/sgml/information_schema.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.18 2004/11/15 06:32:13 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.19 2004/11/27 21:27:06 petere Exp $ -->
22

33
<chapter id="information-schema">
44
<title>The Information Schema</title>
@@ -3267,7 +3267,7 @@ ORDER BY c.ordinal_position;
32673267
<entry>
32683268
The year the standard referenced in
32693269
<literal>sql_language_source</literal> was approved; currently
3270-
<literal>1999</>
3270+
<literal>2003</>
32713271
</entry>
32723272
</row>
32733273

@@ -3276,7 +3276,7 @@ ORDER BY c.ordinal_position;
32763276
<entry><type>character_data</type></entry>
32773277
<entry>
32783278
The standard conformance level for the language binding. For
3279-
ISO 9075:1999 this is always <literal>CORE</literal>.
3279+
ISO 9075:2003 this is always <literal>CORE</literal>.
32803280
</entry>
32813281
</row>
32823282

‎doc/src/sgml/intro.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/intro.sgml,v 1.25 2004/08/08 01:52:14 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/intro.sgml,v 1.26 2004/11/27 21:27:06 petere Exp $
33
-->
44

55
<preface id="preface">
@@ -98,8 +98,8 @@ $PostgreSQL: pgsql/doc/src/sgml/intro.sgml,v 1.25 2004/08/08 01:52:14 momjian Ex
9898

9999
<para>
100100
<productname>PostgreSQL</productname> is an open-source descendant
101-
of this original Berkeley code. It supportsSQL92, SQL99 and
102-
SQL2003 and offers many modern features:
101+
of this original Berkeley code. It supportsa large part of the SQL:2003
102+
standard and offers many modern features:
103103

104104
<itemizedlist spacing="compact">
105105
<listitem>

‎doc/src/sgml/keywords.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/keywords.sgml,v 2.14 2004/10/18 17:09:03 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/keywords.sgml,v 2.15 2004/11/27 21:27:06 petere Exp $ -->
22

33
<appendix id="sql-keywords-appendix">
44
<title><acronym>SQL</acronym> Key Words</title>
@@ -86,9 +86,9 @@
8686
<row>
8787
<entry>Key Word</entry>
8888
<entry><productname>PostgreSQL</productname></entry>
89-
<entry><acronym>SQL</acronym>2003</entry>
90-
<entry><acronym>SQL</acronym>1999</entry>
91-
<entry><acronym>SQL</acronym> 1992</entry>
89+
<entry>SQL:2003</entry>
90+
<entry>SQL:1999</entry>
91+
<entry>SQL-92</entry>
9292
</row>
9393
</thead>
9494

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp