diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-16 17:43:21 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-16 17:43:21 -0400 |
| commit | 6a3e993490ebedce39983a90ced3a87817e6d4ef (patch) | |
| tree | c798917198faa3ccf1a0dac9eb906fe63a28b389 /lib/sqlalchemy | |
| parent | cbf747fdc4e4d6772090042ec357e315be2f61a4 (diff) | |
| download | sqlalchemy-6a3e993490ebedce39983a90ced3a87817e6d4ef.tar.gz | |
- genericize the test for ischema_names
- some fixes to the patch to handle empty args, whitespace
- changelog clarifies where this API fits at the moment
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index f59aa50b4..4e30a76c4 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1471,7 +1471,7 @@ class PGDialect(default.DefaultDialect): """ s = sql.text(SQL_COLS, bindparams=[sql.bindparam('table_oid', type_=sqltypes.Integer)], - typemap={'attname':sqltypes.Unicode, 'default':sqltypes.Unicode} + typemap={'attname': sqltypes.Unicode, 'default': sqltypes.Unicode} ) c = connection.execute(s, table_oid=table_oid) rows = c.fetchall() @@ -1501,8 +1501,8 @@ class PGDialect(default.DefaultDialect): if charlen: charlen = charlen.group(1) args = re.search('\((.*)\)', format_type) - if args: - args = tuple(args.group(1).split(',')) + if args and args.group(1): + args = tuple(re.split('\s*,\s*', args.group(1))) else: args = () kwargs = {} @@ -1535,7 +1535,7 @@ class PGDialect(default.DefaultDialect): args = (int(charlen),) else: args = () - elif attype in ('interval','interval year to month', + elif attype in ('interval', 'interval year to month', 'interval day to second'): if charlen: kwargs['precision'] = int(charlen) |
