Re: default select ordering

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Matt Roberts <matt(at)runtime-collective(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: default select ordering
Date: 2004-10-02 22:11:53
Message-ID: 877jq8ixcm.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matt Roberts <matt(at)runtime-collective(dot)com> writes:

> Please accept my apologies if this is answered elsewhere in the archives
> or docs but I have searched without luck.
>
> I've always assumed that default ordering of selects are based on a first
> in first out principle and that this remains true at the row level despite
> edits to columns.

There is no guaranteed ordering of rows without an ORDER BY clause.
VACUUM will change the row ordering as it moves tuples around to free
up space. If you want a guaranteed order, use a key field and ORDER BY.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Net Virtual Mailing Lists 2004-10-02 22:12:46 Query problem...
Previous Message Tom Lane 2004-10-02 17:43:36 Re: about "pg_dump " without pompt password