File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 10
10
*
11
11
*
12
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.100 2000/11/07 02:17:50 tgl Exp $
13
+ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.101 2000/11/08 16:31:06 tgl Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -670,7 +670,14 @@ ProcessUtility(Node *parsetree,
670
670
671
671
set_ps_display (commandTag = "CLUSTER" );
672
672
673
- cluster (stmt -> relname , stmt -> indexname );
673
+ relname = stmt -> relname ;
674
+ if (IsSystemRelationName (relname ))
675
+ elog (ERROR , "CLUSTER: relation \"%s\" is a system catalog" ,
676
+ relname );
677
+ if (!pg_ownercheck (GetUserId (), relname , RELNAME ))
678
+ elog (ERROR , "permission denied" );
679
+
680
+ cluster (relname , stmt -> indexname );
674
681
}
675
682
break ;
676
683
You can’t perform that action at this time.
0 commit comments