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