Re: ordering problems ... - Mailing list pgsql-sql

From Tom Lane
Subject Re: ordering problems ...
Date
Msg-id 7558.1050414585@sss.pgh.pa.us
Whole thread Raw
In response to Re: ordering problems ...  (David Goodwin <dof@codepoets.co.uk>)
List pgsql-sql
David Goodwin <dof@codepoets.co.uk> writes:
> I just discovered that if i put in a "order by qra.oid" it works ok.

That isn't going to work for long --- for example, as soon as you update
any row in question_response_answer, physical order will stop matching
OID order.

The real answer to your question is that SQL does not consider the
ordering of a table to be significant.  If you want the rows of a query
result to be displayed in a particular order, you have to use ORDER BY.
Without that, the system is entitled to deliver the rows in any order
it finds convenient.
        regards, tom lane



pgsql-sql by date:

Previous
From: "mdc@keko.com.ar"
Date:
Subject: Re: help with query!!!
Next
From: Bruce Momjian
Date:
Subject: Re: [PERFORM] [GENERAL] Yet Another (Simple) Case of Index not used