diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-22 21:14:31 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-22 21:14:31 +0000 |
| commit | 4cc7a93d220644ae068ce2639b961db6764a68f6 (patch) | |
| tree | 85002f8f6887221d98d16dcbdc120246baf6b090 /src/bin/psql/tab-complete.c | |
| parent | e98edb5555de0197ba4ffc99b4f3db134c99a86f (diff) | |
Make REINDEX DATABASE do what one would expect, namely reindex all indexes
in the database. The old behavior (reindex system catalogs only) is now
available as REINDEX SYSTEM. I did not add the complementary REINDEX USER
case since there did not seem to be consensus for this, but it would be
trivial to add later. Per recent discussions.
Diffstat (limited to 'src/bin/psql/tab-complete.c')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 4700cc79bda..648ccadd4f6 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.132 2005/06/21 00:48:33 neilc Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.133 2005/06/22 21:14:30 tgl Exp $ */ /*---------------------------------------------------------------------- @@ -1456,7 +1456,7 @@ psql_completion(char *text, int start, int end) else if (pg_strcasecmp(prev_wd, "REINDEX") == 0) { static const char *const list_REINDEX[] = - {"TABLE", "DATABASE", "INDEX", NULL}; + {"TABLE", "INDEX", "SYSTEM", "DATABASE", NULL}; COMPLETE_WITH_LIST(list_REINDEX); } @@ -1464,10 +1464,11 @@ psql_completion(char *text, int start, int end) { if (pg_strcasecmp(prev_wd, "TABLE") == 0) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL); - else if (pg_strcasecmp(prev_wd, "DATABASE") == 0) - COMPLETE_WITH_QUERY(Query_for_list_of_databases); else if (pg_strcasecmp(prev_wd, "INDEX") == 0) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_indexes, NULL); + else if (pg_strcasecmp(prev_wd, "SYSTEM") == 0 || + pg_strcasecmp(prev_wd, "DATABASE") == 0) + COMPLETE_WITH_QUERY(Query_for_list_of_databases); } /* SELECT */ |
