]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Changed the py-postgresql dialect to indicate that it is using the pyformat parameter...
authorMichael Trier <mtrier@gmail.com>
Tue, 23 Feb 2010 00:27:37 +0000 (00:27 +0000)
committerMichael Trier <mtrier@gmail.com>
Tue, 23 Feb 2010 00:27:37 +0000 (00:27 +0000)
lib/sqlalchemy/dialects/postgresql/pypostgresql.py
test/dialect/test_postgresql.py

index d5ee05f9f53c2d67da649e2d20c0eb70592aa8c0..87582a6cde76ff8008bb9c8f6d6a203077f848f8 100644 (file)
@@ -31,18 +31,15 @@ class PostgreSQL_pypostgresql(PGDialect):
     driver = 'pypostgresql'
 
     supports_unicode_statements = True
-    
     supports_unicode_binds = True
     description_encoding = None
-    
-    default_paramstyle = 'format'
-    
+    default_paramstyle = 'pyformat'
+
     # requires trunk version to support sane rowcounts
     # TODO: use dbapi version information to set this flag appropariately
     supports_sane_rowcount = True
-    
     supports_sane_multi_rowcount = False
-    
+
     execution_ctx_cls = PostgreSQL_pypostgresqlExecutionContext
     colspecs = util.update_copy(
         PGDialect.colspecs,
@@ -51,7 +48,7 @@ class PostgreSQL_pypostgresql(PGDialect):
             sqltypes.Float: sqltypes.Float,  # prevents PGNumeric from being used
         }
     )
-    
+
     @classmethod
     def dbapi(cls):
         from postgresql.driver import dbapi20
index 2d05939fea27212567bf3260504a3df1c1906951..9361f4dbcf8cc3ae5d7dc04165e80b3b8a44da1e 100644 (file)
@@ -1651,6 +1651,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         self.assert_compile(matchtable.c.title.match('somstr'), "matchtable.title @@ to_tsquery(%(title_1)s)")
 
     @testing.fails_on('postgresql+psycopg2', 'uses pyformat')
+    @testing.fails_on('postgresql+pypostgresql', 'uses pyformat')
     @testing.fails_on('postgresql+zxjdbc', 'uses qmark')
     def test_expression_positional(self):
         self.assert_compile(matchtable.c.title.match('somstr'), "matchtable.title @@ to_tsquery(%s)")