facebook/tornado — pull request #419 by jchonphoenix (2011-12-13 08:57:55+00:00)
Title: Adding Postgres support to database.py

This commit will allow for a more robust database.py that covers both major open source sql implementations.

A Connection object has been put into database.py with a method create()
that takes in a constant denoting if you want a Postgres connection or a
MySql one. The Postgres library models that of the MySql library with
minor modifications where necessary due to differences in the databases.

The differences are documented in the code, but two to note are that
Postgres by default no longer supports returning lastrowid, so
execute/executemany now returns None or the result of the query (if
RETURNING is specified).

Postgres also does not have max idle times by default so this was
accounted for in code.