Re: duplicated values on primary key field on reindex

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: duplicated values on primary key field on reindex
Дата
Msg-id 24514.1152840310@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: duplicated values on primary key field on reindex  ("Weerts, Jan" <j.weerts@i-views.de>)
Список pgsql-general
"Weerts, Jan" <j.weerts@i-views.de> writes:
> Scott Marlowe wrote:
>> Can you get set of fields in that row to uniquely identify it by?
>>
>> If so, see if you can update that column to something else and
>> continue

> The only way would be to update by primarykey. But since the
> select on the primarykey field shows this "strange" ordering,
> I wonder, what effect an update would have.

CTID always works:

    SELECT ctid, otherstuff FROM table WHERE ... ;

    eyeball otherstuff to determine row you wish to hack

    UPDATE table SET ... WHERE ctid = '...';

Note: the act of UPDATE changes the row's ctid, don't be surprised.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Timestamp vs timestamptz
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Need help with quote escaping in exim for postgresql