*** a/doc/src/sgml/ref/reindex.sgml --- b/doc/src/sgml/ref/reindex.sgml *************** *** 22,27 **** PostgreSQL documentation --- 22,28 ---- REINDEX { INDEX | TABLE | DATABASE | SYSTEM | USER TABLES } name [ FORCE ] + REINDEX { DATABASE | SYSTEM | USER TABLES } *************** *** 145,151 **** REINDEX { INDEX | TABLE | DATABASE | SYSTEM | USER TABLES } do_user = false; $$ = (Node *)n; } + | REINDEX SYSTEM_P + { + ReindexStmt *n = makeNode(ReindexStmt); + n->kind = OBJECT_DATABASE; + n->name = NULL; + n->relation = NULL; + n->do_system = true; + n->do_user = false; + $$ = (Node *)n; + } | REINDEX DATABASE name opt_force { ReindexStmt *n = makeNode(ReindexStmt); *************** *** 6984,6989 **** ReindexStmt: --- 6994,7009 ---- n->do_user = true; $$ = (Node *)n; } + | REINDEX DATABASE + { + ReindexStmt *n = makeNode(ReindexStmt); + n->kind = OBJECT_DATABASE; + n->name = NULL; + n->relation = NULL; + n->do_system = true; + n->do_user = true; + $$ = (Node *)n; + } | REINDEX USER TABLES name opt_force { ReindexStmt *n = makeNode(ReindexStmt); *************** *** 6994,6999 **** ReindexStmt: --- 7014,7029 ---- n->do_user = true; $$ = (Node *)n; } + | REINDEX USER TABLES + { + ReindexStmt *n = makeNode(ReindexStmt); + n->kind = OBJECT_DATABASE; + n->name = NULL; + n->relation = NULL; + n->do_system = false; + n->do_user = true; + $$ = (Node *)n; + } ; reindex_type: