On Jan 20, 2010, at 10:19 PM, PauloS wrote:
> Hi,
>
> I had a problem with SqlSoup and a table containing a column named
> 'query' (name clash with a built-in property in SqlSoup).
>
> This problem is fixed in trunk, but...
>
> I'm using a PostgreSQL 8.1 legacy database. SqlSoup is searching for
> pg_catalog.pg_enum, which exists only in 8.3 or newer, so sqlalchemy
> throws ProgrammingError.
>
> I patched my pg dialect class to check for database version >= 8.3
> before trying to use enums. Should I submit it?
>
> Thanks in advance,
ah yeah thats a bug. is this your patch ?
Index: lib/sqlalchemy/dialects/postgresql/base.py
===================================================================
--- lib/sqlalchemy/dialects/postgresql/base.py (revision 6658)
+++ lib/sqlalchemy/dialects/postgresql/base.py (working copy)
@@ -1047,6 +1047,9 @@
return indexes
def _load_enums(self, connection):
+ if self.server_version_info < (8, 3):
+ return {}
+
## Load data types for enums:
SQL_ENUMS = """
SELECT t.typname as "name",
> --
> Paulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.