Re: increment_by@ - Mailing list pgsql-general

From Tom Lane
Subject Re: increment_by@
Date
Msg-id 5710.1055282100@sss.pgh.pa.us
Whole thread Raw
In response to Re: increment_by@  (John Smith <john_smith_45678@yahoo.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Dmitry Tkach
Date:
Subject: Re: Weird postmaster crashes
Next
From: John Smith
Date:
Subject: PG error checking?