From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | John Smith <john_smith_45678(at)yahoo(dot)com> |
Cc: | PG-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: increment_by@ |
Date: | 2003-06-10 21:55:00 |
Message-ID: | 5710.1055282100@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
John Smith <john_smith_45678(at)yahoo(dot)com> writes:
> This did the trick:
> update pg_attribute set attname='increment_by' where
> attname like 'increment_by(at)%';
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
From | Date | Subject | |
---|---|---|---|
Next Message | John Smith | 2003-06-10 21:55:18 | PG error checking? |
Previous Message | Ernest E Vogelsinger | 2003-06-10 21:52:21 | Re: Index not being used in MAX function (7.2.3) |