"Randall Parker" <randall(at)nls(dot)net> writes:
> In particular, on his second complaint about the import and
> auto_increment: via what manner can one import a bunch of records and
> then not have the auto_increment next value be correct?
I *think* what he's griping about is that a COPY IN doesn't
automagically change the sequence counter to be >= last imported value
for the serial column.
Of course you can set the counter --- pg_dump scripts do so --- but it
doesn't happen automatically.
You could maybe force that to happen with a trigger, but IMHO the next
work that ought to be done on SERIAL is to convert it into a "real"
datatype. Then stuff like this could be made to happen in the datatype-
specific I/O routines, which seems like a better answer ...
regards, tom lane