diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-02-12 11:23:48 -0500 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-02-12 11:23:48 -0500 |
commit | 632889e6a25ff8a6e6bdf1bdec518198f26e06a2 (patch) | |
tree | fe9e774c7ea404c2a8f2f91cec6aa65acfb38698 | |
parent | 2576ce1bf59b6b10c22118e5e85181267c78227f (diff) |
make tables query schema filter match schematas query
because the schema name where clauses in the schemata and tables queries were different, it was possible for tables to show up in the tables query from schemata that weren't found by the schemata query, resulting in a KeyError and pgcli crashing
-rw-r--r-- | pgcli/pgexecute.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcli/pgexecute.py b/pgcli/pgexecute.py index 093314dd..e50b770d 100644 --- a/pgcli/pgexecute.py +++ b/pgcli/pgexecute.py @@ -43,8 +43,8 @@ class PGExecute(object): LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN ('r','v', 'm') -- table, view, materialized view - AND n.nspname !~ '^pg_toast' - AND n.nspname NOT IN ('information_schema', 'pg_catalog') + AND n.nspname !~ '^pg_' + AND nspname <> 'information_schema' ORDER BY 1,2;''' columns_query = ''' |