]> granicus.if.org Git - postgresql/commitdiff
Also an small change to the tab-complete feature of psql which allows to
authorBruce Momjian <bruce@momjian.us>
Thu, 7 Mar 2002 04:45:53 +0000 (04:45 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 7 Mar 2002 04:45:53 +0000 (04:45 +0000)
use tables and views interchangeably.

Manuel Sugawara

src/bin/psql/tab-complete.c

index 85296fc1999007f08be45c4bb4fd974609b9a15a..e5f3816442fc2aaad4a5ac0e625186c0e946d317 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.43 2002/03/05 00:01:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.44 2002/03/07 04:45:53 momjian Exp $
  */
 
 /*----------------------------------------------------------------------
@@ -141,7 +141,7 @@ pgsql_thing_t words_after_create[] = {
                                                                 * a good idea. */
        {"RULE", "SELECT rulename FROM pg_rules WHERE substr(rulename,1,%d)='%s'"},
        {"SEQUENCE", "SELECT relname FROM pg_class WHERE relkind='S' and substr(relname,1,%d)='%s'"},
-       {"TABLE", "SELECT relname FROM pg_class WHERE relkind='r' and substr(relname,1,%d)='%s'"},
+       {"TABLE", "SELECT relname FROM pg_class WHERE (relkind='r' or relkind='v') and substr(relname,1,%d)='%s'"},
        {"TEMP", NULL},                         /* for CREATE TEMP TABLE ... */
        {"TRIGGER", "SELECT tgname FROM pg_trigger WHERE substr(tgname,1,%d)='%s'"},
        {"TYPE", "SELECT typname FROM pg_type WHERE substr(typname,1,%d)='%s'"},