From 609f71b760d64f8ff512a5caa23d4803f664bd84 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Thu, 7 Mar 2002 04:45:53 +0000
Subject: [PATCH] Also an small change to the tab-complete feature of psql
 which allows to use tables and views interchangeably.

Manuel Sugawara
---
 src/bin/psql/tab-complete.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 85296fc1999..e5f3816442f 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -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'"},
-- 
GitLab