Re: "order by" and "order by asc" returning different results on date field - Mailing list pgsql-bugs

From Tom Lane
Subject Re: "order by" and "order by asc" returning different results on date field
Date
Msg-id 28102.1526410793@sss.pgh.pa.us
Whole thread Raw
In response to "order by" and "order by asc" returning different results on date field  (Rick Gentry <rick.gentry@zenus-biometrics.com>)
Responses Re: "order by" and "order by asc" returning different results on date field  (Rick Gentry <rick.gentry@zenus-biometrics.com>)
List pgsql-bugs
Rick Gentry <rick.gentry@zenus-biometrics.com> writes:
> I have a table that I'm using to log results from my system.  It has a
> field "created timestamp default current_timestamp."

> Running the query "select * from tbl_log order by created asc;" works as
> expected.

> Running the query "select * from tbl_log order by created;" returns sorted
> chunks of 2000 records.

It's quite hard to believe that the ASC annotation affects anything;
it's easily proven that PG's parser creates identical parsetrees for those
two statements.  I have to guess that there is some other effect involved
here.

To start with, what PG version is this, what do you mean exactly by
"sorted chunks", and what client-side code are you using?  Can you
create a self-contained example of the misbehavior?

            regards, tom lane


pgsql-bugs by date:

Previous
From: Rick Gentry
Date:
Subject: "order by" and "order by asc" returning different results on date field
Next
From: Euler Taveira
Date:
Subject: ERROR: subxact logged without previous toplevel record