Index: src/backend/commands/cluster.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/cluster.c,v retrieving revision 1.157 diff -u -r1.157 cluster.c --- src/backend/commands/cluster.c 13 Mar 2007 00:33:39 -0000 1.157 +++ src/backend/commands/cluster.c 15 Mar 2007 10:38:03 -0000 @@ -84,6 +84,12 @@ void cluster(ClusterStmt *stmt, bool isTopLevel) { + if (stmt->verbose == true) + { + ereport(INFO, (errmsg("verbose it is") ) ); + + } + if (stmt->relation != NULL) { /* This is the single-relation case. */ Index: src/backend/parser/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/gram.y,v retrieving revision 2.581 diff -u -r2.581 gram.y --- src/backend/parser/gram.y 13 Mar 2007 00:33:41 -0000 2.581 +++ src/backend/parser/gram.y 15 Mar 2007 10:38:07 -0000 @@ -5277,29 +5277,38 @@ *****************************************************************************/ ClusterStmt: - CLUSTER index_name ON qualified_name + CLUSTER opt_verbose index_name ON qualified_name { ClusterStmt *n = makeNode(ClusterStmt); - n->relation = $4; - n->indexname = $2; + n->relation = $5; + n->verbose = $2; + n->indexname = $3; $$ = (Node*)n; } - | CLUSTER qualified_name + | CLUSTER opt_verbose qualified_name { ClusterStmt *n = makeNode(ClusterStmt); - n->relation = $2; + n->relation = $3; + n->verbose = $2; n->indexname = NULL; $$ = (Node*)n; } - | CLUSTER + | CLUSTER opt_verbose { ClusterStmt *n = makeNode(ClusterStmt); n->relation = NULL; + n->verbose = $2; n->indexname = NULL; $$ = (Node*)n; } ; +opt_verbose: + VERBOSE { $$ = TRUE; } + | /*EMPTY*/ { $$ = FALSE; } + ; + + /***************************************************************************** * * QUERY: @@ -5375,10 +5384,6 @@ | ANALYSE /* British */ {} ; -opt_verbose: - VERBOSE { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } - ; opt_full: FULL { $$ = TRUE; } | /*EMPTY*/ { $$ = FALSE; } Index: src/include/nodes/parsenodes.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/nodes/parsenodes.h,v retrieving revision 1.342 diff -u -r1.342 parsenodes.h --- src/include/nodes/parsenodes.h 13 Mar 2007 00:33:43 -0000 1.342 +++ src/include/nodes/parsenodes.h 15 Mar 2007 10:38:08 -0000 @@ -1774,6 +1774,7 @@ NodeTag type; RangeVar *relation; /* relation being indexed, or NULL if all */ char *indexname; /* original index defined */ + bool verbose; } ClusterStmt; /* ----------------------