Re: Sorting Tuples - Mailing list pgsql-novice

From Manolo
Subject Re: Sorting Tuples
Date
Msg-id 1205416356.7680.36.camel@localhost.localdomain
Whole thread Raw
In response to Sorting Tuples  (Manolo <manolo.espa@gmail.com>)
List pgsql-novice
Hi Brian.

That's what actually I was trying to build in order to get it.

I was thinking about 2 nested query. The inner one just sorting the output, something like:

SELECT * FROM huge_table ORDER BY a_column_of_huge_table ASC

The outer would compare for example the current tuple with the following one and as you said
 "If it finds an index such that a[i] > a[i+1], you know the result isn't sorted correctly."

Could you please write to me a sort of "what should that nested query be", please?
Remark I'm not a database user and SQL is not that fresh to me.

Thank you Brian!

> My advice would be to write a quick application that creates a cursor of
> the sorted results, and sucks them out.  If it finds an index such that
> a[i] > a[i+1], you know the result isn't sorted correctly.
>
> Brian


pgsql-novice by date:

Previous
From: Manolo
Date:
Subject: Re: Sorting Tuples
Next
From: "Jonah H. Harris"
Date:
Subject: Re: Sorting Tuples