1010 *
1111 *
1212 * IDENTIFICATION
13- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.110 1999/10/2603:12:34 momjian Exp $
13+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.111 1999/10/2616:32:46 momjian Exp $
1414 *
1515 * HISTORY
1616 * AUTHORDATEMAJOR EVENT
@@ -242,7 +242,7 @@ Oidparam_type(int t); /* used in parse_expr.c */
242242%type <boolean>opt_varying, opt_timezone
243243
244244%type <ival>Iconst
245- %type <str>Sconst
245+ %type <str>Sconst, comment_text
246246%type <str>UserId, var_value, zone_value
247247%type <str>ColId, ColLabel
248248%type <str>TypeId
@@ -1554,7 +1554,7 @@ TruncateStmt: TRUNCATE TABLE relation_name
15541554 *
15551555 *****************************************************************************/
15561556
1557- CommentStmt:COMMENT ON comment_type name ISSconst
1557+ CommentStmt:COMMENT ON comment_type name IScomment_text
15581558{
15591559CommentStmt *n = makeNode(CommentStmt);
15601560n->objtype = $3;
@@ -1564,7 +1564,7 @@ CommentStmt:COMMENT ON comment_type name IS Sconst
15641564n->comment = $6;
15651565$$ = (Node *) n;
15661566}
1567- | COMMENT ON comment_cl relation_name '.' attr_name ISSconst
1567+ | COMMENT ON comment_cl relation_name '.' attr_name IScomment_text
15681568{
15691569CommentStmt *n = makeNode(CommentStmt);
15701570n->objtype = $3;
@@ -1574,7 +1574,7 @@ CommentStmt:COMMENT ON comment_type name IS Sconst
15741574n->comment = $8;
15751575$$ = (Node *) n;
15761576}
1577- | COMMENT ON comment_ag name aggr_argtype ISSconst
1577+ | COMMENT ON comment_ag name aggr_argtype IScomment_text
15781578{
15791579CommentStmt *n = makeNode(CommentStmt);
15801580n->objtype = $3;
@@ -1584,7 +1584,7 @@ CommentStmt:COMMENT ON comment_type name IS Sconst
15841584n->comment = $7;
15851585$$ = (Node *) n;
15861586}
1587- | COMMENT ON comment_fn func_name func_args ISSconst
1587+ | COMMENT ON comment_fn func_name func_args IScomment_text
15881588{
15891589CommentStmt *n = makeNode(CommentStmt);
15901590n->objtype = $3;
@@ -1594,7 +1594,7 @@ CommentStmt:COMMENT ON comment_type name IS Sconst
15941594n->comment = $7;
15951595$$ = (Node *) n;
15961596}
1597- | COMMENT ON comment_op all_Op '(' oper_argtypes ')' ISSconst
1597+ | COMMENT ON comment_op all_Op '(' oper_argtypes ')' IScomment_text
15981598{
15991599CommentStmt *n = makeNode(CommentStmt);
16001600n->objtype = $3;
@@ -1604,7 +1604,7 @@ CommentStmt:COMMENT ON comment_type name IS Sconst
16041604n->comment = $9;
16051605$$ = (Node *) n;
16061606}
1607- | COMMENT ON comment_tg name ON relation_name ISSconst
1607+ | COMMENT ON comment_tg name ON relation_name IScomment_text
16081608{
16091609CommentStmt *n = makeNode(CommentStmt);
16101610n->objtype = $3;
@@ -1638,8 +1638,12 @@ comment_op:OPERATOR { $$ = OPERATOR; }
16381638;
16391639
16401640comment_tg:TRIGGER { $$ = TRIGGER; }
1641- ;
1641+ ;
16421642
1643+ comment_text:Sconst { $$ = $1; }
1644+ | NULL_P { $$ = 0; }
1645+ ;
1646+
16431647/*****************************************************************************
16441648 *
16451649 *QUERY: