"guillaume (ioguix) de Rorthais" <ioguix(at)free(dot)fr> writes:
> I think I found a bug in pg_dump from PostgreSQL 8.1.
> When creating a table with a SERIAL column, thn alter this column as
> smallint, pg_dump doesn't create the sequence anymore.
This is fixed (along with lots of other corner cases for altered serial
columns) in 8.2. In prior releases, serial columns are best treated
as black boxes.
regards, tom lane