Changes to make Pyrseas tests run under Python 3.2.

 * pyrseas/database.py (flatten): Replace basestring by str.
 * pyrseas/dbobject/__init__.py: Replace string.lowercase by
   string.ascii_lowercase.
 * pyrseas/dbobject/constraint.py (ConstraintDict.from_map): Use
   list() around dict.keys().
 * pyrseas/dbobject/function.py (ProcDict.diff_map): Replace
   basestring by str.
 * pyrseas/dbobject/index.py (Index.key_columns): Replace basestring
   by str. Use list() to wrap dict.keys() and dict.values().
 * pyrseas/dbobject/schema.py (SchemaDict.from_map): No need to remove
   oldname from input schema.
 * pyrseas/dbobject/table.py (MAX_BIGINT): Remove trailing 'L'.
   (Sequence.to_map): Replace sys.maxint by sys.maxsize, test for
   int/long under Python 2 and for int only under Python 3.
 * tests/dbobject/test_constraint.py
   (ForeignKeyToMapTestCase.test_foreign_key_deferred): Replace
   assert_ by AssertTrue.
 * setup.py: Add several Python classifiers and change development
   status to beta.
Change 'username' destination to the 'username' attribute instead of user, since that's what is used in the code.
Fix small bug on "create foreign data wrapper" statement.

When an option value contains the '=' character, the code would fail because opt.split('=') would return a list bigger than 2 items.
Merge pull request #23 from rdunklau/patch-1

Change 'username' destination
Merge pull request #24 from rdunklau/patch-2

Fix small bug on "create foreign data wrapper" statement.
Merge commit '16c08cb47' into extender
Add support for PG 9.1 foreign tables.

 * docs/foreign.rst: Document new features.
 * pyrseas/database.py (Database.Dicts.__init__): Add dictionary for
   foreign tables. (Database.link_refs): Add foreign tables to
   schemas.link_refs and add ftables.link_refs. (Database.diff_map):
   Call diff_map for foreign tables.
 * pyrseas/dbobject/column.py (ColumnDict.query): Retrieve foreign
   table columns.
 * pyrseas/dbobject/foreign.py: Add ForeignTable and ForeignTableDict
   class to implement new features.  Add options_clause helper
   function to abstract creation of OPTIONS clauses.
 * pyrseas/dbobject/schema.py (Schema.to_map): Add ftables to
   objtypes.  (SchemaDict.from_map): Process foreign tables in input.
   (Schema.link_refs): Link foreign tables to their schemas.
 * pyrseas/testutils.py (PostgresDb.clear): Drop foreign tables if
   they exist.
 * tests/dbobject/test_foreign.py: Add new test cases for foreign
   tables.
Change foreign servers to be listed under their wrappers in YAML output.

 * docs/foreign.rst: Add new automethods.
 * pyrseas/database.py (Database.link_refs): Link servers to their FD
   wrappers.  (Database.from_map): Remove mapping of input servers.
   (Database.to_map): Remove mapping of servers.
 * pyrseas/dbobject/foreign.py (ForeignDataWrapper.to_map): New method
   to output servers as part of their wrappers.
   (ForeignDataWrapperDict.from_map): Handle servers as this level.
   (ForeignDataWrapperDict.link_refs): New method to link servers and
   wrappers.  (ForeignServer.identifier): New method.
   (Foreign.ServerDict.query): Order by FDW first.
   (ForeignServerDict.from_map): Use FDW as part of key.
 * tests/dbobject/test_foreign.py: Adjust tests to new input and
   output.
Change user mappings to be listed under their servers in YAML output.

 * docs/foreign.rst: Add new automethods.
 * pyrseas/database.py (Database.link_refs): Link user mappings to
   their servers.  (Database.from_map): Remove mapping of input user
   mappings.  (Database.to_map): Remove mapping of user mappings.
 * pyrseas/dbobject/foreign.py (ForeignDataWrapperDict.from_map): Add
   newdb argument to downstream call.  (ForeignServer.to_map): New
   method to output user mappings as part of their servers.
   (ForeignServer.from_map): Handle user mappings as this level.
   (ForeignServerDict.link_refs): New method to link mappings and
   servers.  (ForeignServer.extern_key): Change output format.
   (Foreign.UserMappingDict.query): Add join to
   pg_foreign_data_wrapper and change sort order.
   (UserMappingDict.from_map): Change arguments and reorganize for new
   input.  (UserMappingDict.diff_map): Change key tuples.
 * tests/dbobject/test_foreign.py: Adjust tests to new input and
   output.
Correct order of creation/destruction of FDW-related objects.

 * pyrseas/database.py (Database.diff_map): Reorder calls and add
   calls to drop servers and FDWs.
 * pyrseas/dbobject/foreign.py (ForeignDataWrapperDict.diff_map): Mark
   wrappers to be dropped.  (ForeignDataWrapperDict._drop): New method
   to actually drop the wrappers.  (ForeignServerDict.diff_map): Mark
   servers to be dropped.  (ForeignServerDict._drop): New method to
   actually drop the servers.
 * tests/dbobject/test_foreign.py: New tests to verify order of
   multiple object creation/destruction.
Add support for modification of OPTIONS of FDW-related objects.

 * docs/foreign.rst: Document new helper class DbObjectWithOptions.
 * pyrseas/dbobject/foreign.py (DbObjectWithOptions): New helper
   class.  ({ForeignDataWrapper, ForeignServer, UserMapping,
   ForeignTable}): Derive from new helper class, add diff_map method
   (except for UserMapping) and change create method.
 * tests/dbobject/test_foreign.py: New tests to verify OPTIONS changes.
Changes to foreign tables should use ALTER FOREIGN TABLE.

 * pyrseas/dbobject/column.py (Column.drop): Use objtype instead of
   hard-coding 'TABLE'.
 * pyrseas/dbobject/foreign.py (DbObjectWithOptions.diff_map): Invoke
   super method.
 * pyrseas/dbobject/table.py (Table.diff_map): Use objtype instead of
   hard-coding 'TABLE'.
 * tests/dbobject/test_foreign.py: New test to verify changes.

Main changes by Ronan Dunklau, test by Joe Abbate.
Update release files for 0.5.0.
Fix dbconn.py exception handling under Python 3. Fixes #25.

  Author: Chris Mayo
Additional fix of queries to correctly exclude internal schemas.

 * pyrseas/testutils.py (PostgresDb.clear): Exclude pg_catalog and
   information_schema instead of joining to pg_roles.

See commits 5a6e4bc and 8d92dd8 10 Oct 2011 for original changes.
Merge commit 'd361b67' into extender
Schema-qualify trigger functions based on the table's schema.

 * pyrseas/extend/audit.py (CfgAuditColumn.apply): Separate the schema
   from the function name before looking up in the configuration
   functions.
 * pyrseas/extend/trigger.py (CfgTrigger.apply): If the trigger
   procedure's schema is not the same as the table schema, assign the
   latter to the former.
 * tests/extend/test_audit.py: New test to verify fix.