From 5b00c6555f67d0837ae64a33077dd87571fc1e0e Mon Sep 17 00:00:00 2001 From: Ben Trofatter Date: Mon, 18 Mar 2013 12:40:40 -0700 Subject: [PATCH] Corrected silly circular import introduced by original "fix". --- lib/sqlalchemy/dialects/postgresql/base.py | 2 -- lib/sqlalchemy/dialects/postgresql/hstore.py | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 0d40c87f40..c59caff8d2 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -195,7 +195,6 @@ from ... import sql, schema, exc, util from ...engine import default, reflection from ...sql import compiler, expression, util as sql_util, operators from ... import types as sqltypes -from .hstore import HSTORE try: from uuid import UUID as _python_UUID @@ -894,7 +893,6 @@ ischema_names = { 'interval': INTERVAL, 'interval year to month': INTERVAL, 'interval day to second': INTERVAL, - 'hstore': HSTORE, } diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py index 157e03fd51..e555a1afd9 100644 --- a/lib/sqlalchemy/dialects/postgresql/hstore.py +++ b/lib/sqlalchemy/dialects/postgresql/hstore.py @@ -6,7 +6,7 @@ import re -from .base import ARRAY +from .base import ARRAY, ischema_names from ... import types as sqltypes from ...sql import functions as sqlfunc from ...sql.operators import custom_op @@ -276,6 +276,9 @@ class HSTORE(sqltypes.Concatenable, sqltypes.TypeEngine): return process +ischema_names['hstore'] = HSTORE + + class hstore(sqlfunc.GenericFunction): """Construct an hstore value within a SQL expression using the Postgresql ``hstore()`` function. -- 2.47.2