1010 *
1111 *
1212 * IDENTIFICATION
13- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.110 1999/10/26 03:12:34 momjian Exp $
13+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.111 1999/10/26 16:32:46 momjian Exp $
1414 *
1515 * HISTORY
1616 * AUTHOR DATE MAJOR EVENT
@@ -242,7 +242,7 @@ Oid param_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 IS Sconst
1557+ CommentStmt: COMMENT ON comment_type name IS comment_text
15581558 {
15591559 CommentStmt *n = makeNode(CommentStmt);
15601560 n->objtype = $3;
@@ -1564,7 +1564,7 @@ CommentStmt: COMMENT ON comment_type name IS Sconst
15641564 n->comment = $6;
15651565 $$ = (Node *) n;
15661566 }
1567- | COMMENT ON comment_cl relation_name '.' attr_name IS Sconst
1567+ | COMMENT ON comment_cl relation_name '.' attr_name IS comment_text
15681568 {
15691569 CommentStmt *n = makeNode(CommentStmt);
15701570 n->objtype = $3;
@@ -1574,7 +1574,7 @@ CommentStmt: COMMENT ON comment_type name IS Sconst
15741574 n->comment = $8;
15751575 $$ = (Node *) n;
15761576 }
1577- | COMMENT ON comment_ag name aggr_argtype IS Sconst
1577+ | COMMENT ON comment_ag name aggr_argtype IS comment_text
15781578 {
15791579 CommentStmt *n = makeNode(CommentStmt);
15801580 n->objtype = $3;
@@ -1584,7 +1584,7 @@ CommentStmt: COMMENT ON comment_type name IS Sconst
15841584 n->comment = $7;
15851585 $$ = (Node *) n;
15861586 }
1587- | COMMENT ON comment_fn func_name func_args IS Sconst
1587+ | COMMENT ON comment_fn func_name func_args IS comment_text
15881588 {
15891589 CommentStmt *n = makeNode(CommentStmt);
15901590 n->objtype = $3;
@@ -1594,7 +1594,7 @@ CommentStmt: COMMENT ON comment_type name IS Sconst
15941594 n->comment = $7;
15951595 $$ = (Node *) n;
15961596 }
1597- | COMMENT ON comment_op all_Op '(' oper_argtypes ')' IS Sconst
1597+ | COMMENT ON comment_op all_Op '(' oper_argtypes ')' IS comment_text
15981598 {
15991599 CommentStmt *n = makeNode(CommentStmt);
16001600 n->objtype = $3;
@@ -1604,7 +1604,7 @@ CommentStmt: COMMENT ON comment_type name IS Sconst
16041604 n->comment = $9;
16051605 $$ = (Node *) n;
16061606 }
1607- | COMMENT ON comment_tg name ON relation_name IS Sconst
1607+ | COMMENT ON comment_tg name ON relation_name IS comment_text
16081608 {
16091609 CommentStmt *n = makeNode(CommentStmt);
16101610 n->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:
0 commit comments