Commit 90edb265 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Implement SQL99 CREATE CAST and DROP CAST statements.

 Also implement alternative forms to expose the PostgreSQL CREATE FUNCTION
 features.
Implement syntax for READ ONLY and READ WRITE clauses in SET TRANSACTION.
 READ WRITE is already implemented (of course).
Implement syntax for "LIKE table" clause in CREATE TABLE. Should be fairly
 easy to complete since it resembles SELECT INTO.
Implement MATCH SIMPLE clause for foreign key definitions. This is explicit
 SQL99 syntax for the default behavior, so we now support it :)
Start implementation of shorthand for national character literals in
 scanner. For now, just swallow the leading "N", but sometime soon let's
 figure out how to pass leading type info from the scanner to the parser.
 We should use the same technique for binary and hex bit string literals,
 though it might be unusual to have two apparently independent literal
 types fold into the same storage type.
parent cc8839a1
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.3 2002/06/22 02:04:55 thomas Exp $
-->
<appendix id="features">
<title>SQL99 Feature List</title>
<sect1 id="features-sql99">
<title>Supported Features</title>
<para>
<acronym>SQL92</acronym> defined three feature sets for
compliance: basic, intermediate, and advanced. Most database
products claiming <acronym>SQL</acronym> standards compliance were
compliant at only the basic level, since the entire set of
intermediate and advanced features was either too voluminous or in
conflict with legacy behaviors.
</para>
<para>
<acronym>SQL92</acronym> defined three feature sets for
compliance: basic, intermediate, and advanced. Most database
products claiming <acronym>SQL</acronym> standards compliance were
compliant at only the basic level, since the entire set of
intermediate and advanced features was either too voluminous or in
conflict with legacy behaviors.
</para>
<para>
<acronym>SQL99</acronym> defines a large set of individual
features rather than the ineffectively broad three levels found in
<acronym>SQL92</acronym>. We provide a list of supported features,
followed by a list of the features defined in SQL99 which are not
yet supported in PostgreSQL.
</para>
<para>
<acronym>SQL99</acronym> defines a large set of individual
features rather than the ineffectively broad three levels found in
<acronym>SQL92</acronym>. We provide a list of supported features,
followed by a list of the features defined in SQL99 which are not
yet supported in PostgreSQL.
</para>
<sect1 id="features-sql99">
<title>Supported Features</title>
<para>
<informaltable>
......@@ -1132,6 +1132,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 tho
<entry>Array as result type of functions</entry>
<entry></entry>
</row>
<row>
<entry>S211</entry>
<entry>User-defined cast functions</entry>
<entry>CREATE CAST(type AS type)</entry>
</row>
<row>
<entry>T031</entry>
<entry>BOOLEAN data type</entry>
......@@ -1147,11 +1152,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 tho
<entry>DISTINCT predicate</entry>
<entry></entry>
</row>
<row>
<entry>T171</entry>
<entry>LIKE clause in table definition</entry>
<entry></entry>
</row>
<row>
<entry>T191</entry>
<entry>Referential action RESTRICT</entry>
......@@ -1318,7 +1318,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 tho
<entry>E152-02</entry>
<entry>SET TRANSACTION statement: READ ONLY and READ WRITE
clauses</entry>
<entry></entry>
<entry>Syntax accepted; READ ONLY not supported</entry>
</row>
<row>
<entry>E171</entry>
......@@ -1621,11 +1621,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 tho
<entry>Subtype treatment</entry>
<entry>TREAT(expr AS type)</entry>
</row>
<row>
<entry>S211</entry>
<entry>User-defined cast functions</entry>
<entry>CREATE CAST(type AS type) WITH</entry>
</row>
<row>
<entry>S231</entry>
<entry>Structured type locators</entry>
......@@ -1712,6 +1707,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.2 2002/06/19 06:11:36 tho
<entry>Recursive query</entry>
<entry></entry>
</row>
<row>
<entry>T171</entry>
<entry>LIKE clause in table definition</entry>
<entry>CREATE TABLE T1 (LIKE T2)</entry>
</row>
<row>
<entry>T211-05</entry>
<entry>Ability to specify a search condition that must be true
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.116 2002/06/20 20:29:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.117 2002/06/22 02:04:45 thomas Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -44,6 +44,7 @@ static const ScanKeyword ScanKeywords[] = {
{"as", AS},
{"asc", ASC},
{"assertion", ASSERTION},
{"assignment", ASSIGNMENT},
{"at", AT},
{"authorization", AUTHORIZATION},
{"backward", BACKWARD},
......@@ -258,6 +259,7 @@ static const ScanKeyword ScanKeywords[] = {
{"share", SHARE},
{"show", SHOW},
{"similar", SIMILAR},
{"simple", SIMPLE},
{"smallint", SMALLINT},
{"some", SOME},
{"stable", STABLE},
......@@ -312,6 +314,7 @@ static const ScanKeyword ScanKeywords[] = {
{"with", WITH},
{"without", WITHOUT},
{"work", WORK},
{"write", WRITE},
{"year", YEAR_P},
{"zone", ZONE},
};
......
......@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.96 2002/06/20 20:29:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.97 2002/06/22 02:04:45 thomas Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -107,8 +107,8 @@ unsigned char unescape_single_char(unsigned char c);
/* Bit string
*/
xbstart [bB]{quote}
xbstop {quote}
xbstart [bB]{quote}
xbstop {quote}
xbinside [^']*
xbcat {quote}{whitespace_with_newline}{quote}
......@@ -119,6 +119,10 @@ xhstop {quote}
xhinside [^']+
xhcat {quote}{whitespace_with_newline}{quote}
/* National character
*/
xnstart [nN]{quote}
/* Extended quote
* xqdouble implements SQL92 embedded quote
* xqcat allows strings to cross input lines
......@@ -286,6 +290,10 @@ other .
<xc><<EOF>> { yyerror("unterminated /* comment"); }
{xbstart} {
/* Binary bit type.
* Should be passing the type forward into the parser
* rather than trying to embed it into the string.
*/
token_start = yytext;
BEGIN(xb);
startlit();
......@@ -309,6 +317,10 @@ other .
<xb><<EOF>> { yyerror("unterminated bit string literal"); }
{xhstart} {
/* Hexadecimal bit type.
* Should be passing the type forward into the parser
* rather than trying to embed it into the string.
*/
token_start = yytext;
BEGIN(xh);
startlit();
......@@ -332,6 +344,17 @@ other .
}
<xh><<EOF>> { yyerror("unterminated hexadecimal integer"); }
{xnstart} {
/* National character.
* Need to remember type info to flow it forward into the parser.
* Not yet implemented. - thomas 2002-06-17
*/
token_start = yytext;
BEGIN(xq);
startlit();
}
{xqstart} {
token_start = yytext;
BEGIN(xq);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment