diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/sql_features.txt | 2 | ||||
-rw-r--r-- | src/backend/parser/gram.y | 19 | ||||
-rw-r--r-- | src/backend/parser/keywords.c | 3 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/backend/catalog/sql_features.txt b/src/backend/catalog/sql_features.txt index 6e4871fbf18..4c50a22a0af 100644 --- a/src/backend/catalog/sql_features.txt +++ b/src/backend/catalog/sql_features.txt @@ -236,7 +236,7 @@ F381 Extended schema manipulation YES F381 Extended schema manipulation 01 ALTER TABLE statement: ALTER COLUMN clause YES F381 Extended schema manipulation 02 ALTER TABLE statement: ADD CONSTRAINT clause YES F381 Extended schema manipulation 03 ALTER TABLE statement: DROP CONSTRAINT clause YES -F382 Alter column data type NO PostgreSQL syntax differs +F382 Alter column data type YES F391 Long identifiers YES F392 Unicode escapes in identifiers NO F393 Unicode escapes in literals NO diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 55e5828e321..aa5f33b4114 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.626 2008/10/20 14:26:28 petere Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.627 2008/10/21 08:38:15 petere Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -304,7 +304,7 @@ static TypeName *TableFuncTypeName(List *columns); %type <boolean> copy_from -%type <ival> opt_column event cursor_options opt_hold +%type <ival> opt_column event cursor_options opt_hold opt_set_data %type <objtype> reindex_type drop_type comment_type %type <node> fetch_direction select_limit_value select_offset_value @@ -407,7 +407,7 @@ static TypeName *TableFuncTypeName(List *columns); CREATEROLE CREATEUSER CROSS CSV CTYPE CURRENT_P CURRENT_DATE CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE - DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS + DATA_P DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT DEFAULTS DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS DESC DICTIONARY DISABLE_P DISCARD DISTINCT DO DOCUMENT_P DOMAIN_P DOUBLE_P DROP @@ -1534,16 +1534,16 @@ alter_table_cmd: $$ = (Node *)n; } /* - * ALTER TABLE <name> ALTER [COLUMN] <colname> TYPE <typename> + * ALTER TABLE <name> ALTER [COLUMN] <colname> [SET DATA] TYPE <typename> * [ USING <expression> ] */ - | ALTER opt_column ColId TYPE_P Typename alter_using + | ALTER opt_column ColId opt_set_data TYPE_P Typename alter_using { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AlterColumnType; n->name = $3; - n->def = (Node *) $5; - n->transform = $6; + n->def = (Node *) $6; + n->transform = $7; $$ = (Node *)n; } /* ALTER TABLE <name> ADD CONSTRAINT ... */ @@ -4854,6 +4854,10 @@ opt_column: COLUMN { $$ = COLUMN; } | /*EMPTY*/ { $$ = 0; } ; +opt_set_data: SET DATA_P { $$ = 1; } + | /*EMPTY*/ { $$ = 0; } + ; + /***************************************************************************** * * ALTER THING name SET SCHEMA name @@ -9317,6 +9321,7 @@ unreserved_keyword: | CURRENT_P | CURSOR | CYCLE + | DATA_P | DATABASE | DAY_P | DEALLOCATE diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c index c55bfd8b5cd..7c6aa71572a 100644 --- a/src/backend/parser/keywords.c +++ b/src/backend/parser/keywords.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.202 2008/10/04 21:56:54 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.203 2008/10/21 08:38:15 petere Exp $ * *------------------------------------------------------------------------- */ @@ -123,6 +123,7 @@ const ScanKeyword ScanKeywords[] = { {"current_user", CURRENT_USER, RESERVED_KEYWORD}, {"cursor", CURSOR, UNRESERVED_KEYWORD}, {"cycle", CYCLE, UNRESERVED_KEYWORD}, + {"data", DATA_P, UNRESERVED_KEYWORD}, {"database", DATABASE, UNRESERVED_KEYWORD}, {"day", DAY_P, UNRESERVED_KEYWORD}, {"deallocate", DEALLOCATE, UNRESERVED_KEYWORD}, |