Ralf Miller <rm(at)topnet(dot)de> writes:
> The example shows that the column number of type serial is incremented
> as if the preceding insert-statement was successfull, even if it was
> not.
This is intentional. Sequence nextval() operations do not roll back.
> The SEQUENCE corresponding to a column of type serial is not beeing
> droped
> automatically when the table containing the serial-column is droped.
This is an acknowledged problem; it'll be fixed someday.
regards, tom lane