couple bugs with schema
Jonathan Ellis <[email protected]> Thu, 12 Jan 2006 17:47:35 -0700
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
autoschema(schema='pg_catalog') throws an exception (PG 8.1):
>>> pydo.autoschema('cf', schema='pg_catalog')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "pydo\base.py", line 844, in autoschema
obj=type(Table, (PyDO,), d)
File "pydo\base.py", line 84, in __init__
gfields, gunique=cls._getTableDescription()
File "pydo\base.py", line 200, in _getTableDescription
data=cls.getDBI().describeTable(cls.getTable(False), cls.schema)
File "pydo\drivers\psycopgconn.py", line 288, in describeTable
fields[L[0]].unique = True
KeyError: -2
autoschema(schema='xxy') returns classes found in schema xxy, but if
there is a table with the same name defined in the public schema for
any of those classes, name, it will return the definition from the
table in public.
I'm running the latest from svn.
--
Jonathan Ellis
http://spyced.blogspot.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click