Skip to content

Commit

Permalink
sql: compat: Support 'COMMENT ON TABLE foo is 'bar' parsing
Browse files Browse the repository at this point in the history
Change comment_stmt to use unimplementedWithIssue. Remove help text.
Change formatting to use spaces instead of tabs.

Release note: none
  • Loading branch information
Zachary.smith authored and Zachary.smith committed Dec 27, 2017
1 parent a141427 commit ab530a3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions pkg/sql/parser/sql.y
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ stmt:
| cancel_stmt // help texts in sub-rule
| scrub_stmt
| copy_from_stmt
| comment_stmt // EXTEND WITH HELP: COMMENT
| comment_stmt
| create_stmt // help texts in sub-rule
| deallocate_stmt // EXTEND WITH HELP: DEALLOCATE
| delete_stmt // EXTEND WITH HELP: DELETE
Expand Down Expand Up @@ -1643,23 +1643,21 @@ cancel_query_stmt:
}
| CANCEL QUERY error // SHOW HELP: CANCEL QUERY

// %Help: COMMENT - add a comment to a database object
// %Category: Misc
// %Text:
// COMMENT ON [ COLUMN | TABLE ] <objname> IS { 'text' | NULL }
comment_stmt:
/* SKIP DOC */
COMMENT ON TABLE any_name IS comment_text
{
return unimplemented(sqllex, "COMMENT ON TABLE unimplemented")
return unimplementedWithIssue(sqllex, 19472)
}
/* SKIP DOC */
| COMMENT ON COLUMN any_name IS comment_text
{
return unimplemented(sqllex, "COMMENT ON COLUMN unimplemented")
return unimplementedWithIssue(sqllex, 19472)
}

comment_text:
SCONST { $$ = $1 }
| NULL { $$ = "" }
SCONST { $$ = $1 }
| NULL { $$ = "" }

// %Help: CREATE
// %Category: Group
Expand Down

0 comments on commit ab530a3

Please sign in to comment.