Kaynağa Gözat

make postresql views visible

chansizzle 4 yıl önce
ebeveyn
işleme
f484eef70b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      sql_query.php

+ 2 - 2
sql_query.php

@@ -17,7 +17,7 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Portions created by the Initial Developer are Copyright (C) 2008-2019
+	Portions created by the Initial Developer are Copyright (C) 2008-2021
 	the Initial Developer. All Rights Reserved.
 
 	Contributor(s):
@@ -184,7 +184,7 @@
 	echo "						<option value=''></option>\n";
 	switch ($db_type) {
 		case 'sqlite': $sql = "select name from sqlite_master where type='table' order by name;"; break;
-		case 'pgsql': $sql = "select table_name as name from information_schema.tables where table_schema='public' and table_type='BASE TABLE' order by table_name"; break;
+		case 'pgsql': $sql = "select table_name as name from information_schema.tables where table_schema='public' and (table_type='BASE TABLE' or table_type='VIEW') order by table_name"; break;
 		case 'mysql': $sql = "show tables"; break;
 	}
 	$database = new database;