londiste: add-seq --all should ignore pgq, londiste and temp schemas
authorMarko Kreen <markokr@gmail.com>
Fri, 29 May 2009 10:21:32 +0000 (10:21 +0000)
committerMarko Kreen <markokr@gmail.com>
Fri, 29 May 2009 10:21:32 +0000 (10:21 +0000)
Before it also added internal seqs which was not good idea.

Reported by Günther Jedenastik

python/londiste/setup.py

index 1b14d01936e157b57e51ee5503cd9191b6e22d01..bce94e2ac15932003f888307d32fd526e5734882 100644 (file)
@@ -101,10 +101,12 @@ class CommonSetup(skytools.DBScript):
         return res
 
     def get_all_seqs(self, curs):
-        q = """SELECT n.nspname || '.'|| c.relname
+        q = """SELECT n.nspname || '.' || c.relname
                  from pg_class c, pg_namespace n
                 where n.oid = c.relnamespace 
                   and c.relkind = 'S'
+                  and n.nspname not in ('pgq', 'londiste', 'pgq_node')
+                  and n.nspname !~ '^pg_temp_.*'
                 order by 1"""
         curs.execute(q)
         res = []