Commits

Mike Bayer  committed 583b459

dbengine doc: no support for pg1
postgres: if module is none, still use pyformat for some unit tests

  • Participants
  • Parent commits 674649f

Comments (0)

Files changed (2)

File doc/build/content/dbengine.txt

 
 ### 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}
 

File lib/sqlalchemy/databases/postgres.py

     except:
         psycopg = None
 
-
 class PGNumeric(sqltypes.Numeric):
     def get_col_spec(self):
         return "NUMERIC(%(precision)s, %(length)s)" % {'precision': self.precision, 'length' : self.length}
         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'):