Fix: ConfigParser add_argument -> add_option.
--- a/pgtoolkit/pgbrowser.py Thu Aug 08 15:26:24 2013 +0200
+++ b/pgtoolkit/pgbrowser.py Fri Aug 16 13:19:26 2013 +0200
@@ -417,7 +417,11 @@
return self._query('''select pg_get_functiondef(%s);''', [oid])
def list_types(self, schema='public'):
- """List types in schema."""
+ """List types in schema.
+
+ http://www.postgresql.org/docs/8.4/static/catalog-pg-type.html
+
+ """
return self._query('''
SELECT
t.typname AS "name",
--- a/runquery.py Thu Aug 08 15:26:24 2013 +0200
+++ b/runquery.py Fri Aug 16 13:19:26 2013 +0200
@@ -20,9 +20,9 @@
self.parser.add_argument('-c', dest='config', type=str, help='Additional config file (besides pgtoolkit.conf).')
self.parser.add_argument('-q', dest='queries', metavar='QUERY', nargs='*', help='Queries to run.')
- self.config.add_argument('target', type=str, default=None)
- self.config.add_argument('queries', type=list, default=[])
- self.config.add_argument('log_path', type=str)
+ self.config.add_option('target', type=str, default=None)
+ self.config.add_option('queries', type=list, default=[])
+ self.config.add_option('log_path', type=str)
self.target_isolation_level = 'autocommit'