Re: renumber id's in correct order (compact id's)

From: peter pilsl <pilsl(at)goldfisch(dot)at>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Re: renumber id's in correct order (compact id's)
Date: 2005-06-21 14:28:37
Message-ID: 42B82415.4070007@goldfisch.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout wrote:
>>
>>thnx a lot. But it does not work as expected cause the update-statement
>>ist not commiting for the whole table during the execution. So the
>>resulting order can be different from the original order, which is what
>>I try to avoid.
>
>
> Well, that's because you're typing the query wrong. Because you said:
>
> where t2.id <= voev_content.id
>
> It's going to order them by the id (which you didn't show in your query
> which is why it's not obvious). If you want to order by rank you should
> do (your query search-replace id for rank):
>

;) thnx a lot. While I was reading the manuals to reveal the secrets of
transaction-levels in update-operations I simply missed the obvious: a
typo when moving the command from my test-table to the real-world-table.

Thnx a lot for your help. Now everything is working perfekt.
peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message AgentM 2005-06-21 14:58:59 Re: Escape handling in strings
Previous Message Tom Lane 2005-06-21 14:23:52 Re: 8.03 postgres install error