Skip to content

Commit d426869

Browse files
committed
Fix compile after COMMENT problem.
1 parent 9e44249 commit d426869

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

src/backend/commands/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for commands
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.19 1999/10/26 03:12:34 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.20 1999/10/26 16:32:46 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -33,6 +33,9 @@ SUBSYS.o: $(OBJS)
3333

3434
comment.o: ../parse.h
3535

36+
../parse.h:
37+
$(MAKE) -C .. parse.h
38+
3639
depend dep:
3740
$(CC) -MM $(CFLAGS) *.c >depend
3841

src/backend/parser/gram.y

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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

16401640
comment_tg: TRIGGER { $$ = TRIGGER; }
1641-
;
1641+
;
16421642

1643+
comment_text: Sconst { $$ = $1; }
1644+
| NULL_P { $$ = 0; }
1645+
;
1646+
16431647
/*****************************************************************************
16441648
*
16451649
* QUERY:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy