Re: ordering problems ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Goodwin <dof(at)codepoets(dot)co(dot)uk>
Cc: DIB Walid <walid(dot)dib(at)inrialpes(dot)fr>, pgsql-sql(at)postgresql(dot)org
Subject: Re: ordering problems ...
Date: 2003-04-15 13:49:45
Message-ID: 7558.1050414585@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

David Goodwin <dof(at)codepoets(dot)co(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message pginfo 2003-04-15 14:21:15 changing column size and type.
Previous Message mdc@keko.com.ar 2003-04-15 13:03:46 Re: help with query!!!