"Andrew G. Hammond" <drew@xyzzy.dhs.org> writes:
> Now maybe THAT behaviour should be a bug. Since the nextval() is
> implicit in the second INSERT, and the second INSERT fails, it would
> make sense to roll back the nextval().
nextval() is never rolled back; this is quite intentional. See many past
discussions in the archives ...
regards, tom lane