If a record does not have any values set, but its identifier is defined as autoincrement, the record cannot be inserted into PostgreSQL.
This code snippet will add null values to all fields, including to the autoincrement identifier.
Then later in Doctrine_Connection_Pgsql::insert():
The claimed fix for the referenced tickets does not work correctly for 2 reasons:
1. It only works for tables with a single id field
2. It only works correctly if the id field had no value assigned. If there was a value assigned, it silently bypasses it, and inserts with the autoincremented value.
Patch with test case will be attached to the ticket.