John Smith <john_smith_45678@yahoo.com> writes:
> This did the trick:
> update pg_attribute set attname='increment_by' where
> attname like 'increment_by@%';
Good.
> Not sure what the problem with this was:
> update pg_attribute set attname='increment_by' where
> attrelid=457191;
> ERROR: Cannot insert a duplicate key into unique
> index pg_attribute_relid_attnam_index
There would be multiple rows with that attrelid, so the error is correct
(and fortunate ;-)). You'd have had to specify both attrelid and attnum
to have a unique key.
regards, tom lane