The following bug has been logged online:
Bug reference: 1138
Logged by: Emil Tarazi
Email address: emil@cmu.edu
PostgreSQL version: 7.4
Operating system: Linux
Description: Auto-increment and Rollback
Details:
If a query is called within a BEGIN-COMMIT/ROLLBACK block that
auto-increments some field, a ROLLBACK will not decrement that field.