Permalink
Browse files

Don't output the pg_catalog schema unless it has more than a descript…

…ion.
  • Loading branch information...
1 parent b34a9b9 commit 785b184e2be8fc6305c92a669bd04a6720a09681 @jmafc jmafc committed Jun 22, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 pyrseas/database.py
View
@@ -251,6 +251,12 @@ def to_map(self, schemas=[], tables=[], exclude_schemas=[],
del dbmap[sch][key]
if not dbmap[sch]:
del dbmap[sch]
+
+ # special case for pg_catalog schema
+ if 'schema pg_catalog' in dbmap and \
+ len(dbmap['schema pg_catalog']) == 1 and \
+ 'description' in dbmap['schema pg_catalog']:
+ del dbmap['schema pg_catalog']
return dbmap
def diff_map(self, input_map, schemas=[]):

0 comments on commit 785b184

Please sign in to comment.