]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dbengine doc: no support for pg1
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Jun 2006 17:48:55 +0000 (17:48 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Jun 2006 17:48:55 +0000 (17:48 +0000)
postgres: if module is none, still use pyformat for some unit tests

doc/build/content/dbengine.txt
lib/sqlalchemy/databases/postgres.py

index a83da7310263447391a180f3f7313e93c49cf417..e71c44fb29ba9176b9f3c49b88e14c5e844cb1b0 100644 (file)
@@ -20,7 +20,7 @@ Underneath the public-facing API of `ComposedSQLEngine`, several components are
 
 ### Supported Databases {@name=supported}
 
-Engines exist for SQLite, Postgres, MySQL, and Oracle, using the Pysqlite, Psycopg (1 or 2), MySQLDB, and cx_Oracle modules.  There is also preliminary support for MS-SQL using adodbapi or pymssql, as well as Firebird.   For each engine, a distinct Python module exists in the `sqlalchemy.databases` package, which provides implementations of some of the objects mentioned in the previous section.
+Engines exist for SQLite, Postgres, MySQL, and Oracle, using the Pysqlite, Psycopg2 (Psycopg1 will work to some degree but its typing model is not supported...install Psycopg2!), MySQLDB, and cx_Oracle modules.  There is also preliminary support for MS-SQL using adodbapi or pymssql, as well as Firebird.   For each engine, a distinct Python module exists in the `sqlalchemy.databases` package, which provides implementations of some of the objects mentioned in the previous section.
 
 ### Establishing a Database Engine {@name=establishing}
 
index b6917c0358c87f416cdd19cd1ece5fac87783799..50d67ad5617fcf5f584bbf1e56aa2498865b4cb8 100644 (file)
@@ -30,7 +30,6 @@ except:
     except:
         psycopg = None
 
-
 class PGNumeric(sqltypes.Numeric):
     def get_col_spec(self):
         return "NUMERIC(%(precision)s, %(length)s)" % {'precision': self.precision, 'length' : self.length}
@@ -215,7 +214,10 @@ class PGDialect(ansisql.ANSIDialect):
         except:
             self.version = 1
         ansisql.ANSIDialect.__init__(self, **params)
-
+        # produce consistent paramstyle even if psycopg2 module not present
+        if self.module is None:
+            self.paramstyle = 'pyformat'
+        
     def create_connect_args(self, url):
         opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port'])
         if opts.has_key('port'):