Re: Clustered table order is not preserved on insert

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: "Andrus" <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Clustered table order is not preserved on insert
Date: 2006-04-26 19:00:44
Message-ID: 87u08gduw3.fsf@suzuka.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <eetasoft(at)online(dot)ee> writes:

> Why postgres 8.1.3 changes order ?
> How to preserve order in newr without adding extra field to report table ?

You are never guaranteed any order in a result set unless you use
ORDER BY in the query. Because PG treats UPDATE as DELETE + INSERT,
the table ordering changes all the time.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-04-26 19:11:40 Re: Clustered table order is not preserved on insert
Previous Message Andrus 2006-04-26 18:55:49 Clustered table order is not preserved on insert