Difference between revisions of "Default orderBy research 2/17/2011"

From CDOT Wiki
Jump to: navigation, search
(Created page with 'While debugging some test units (testRead, testUpdate) I have noticed that the error message is the following:"Doesn't match the serialized representation".<br/> I checked the da…')
 
Line 1: Line 1:
While debugging some test units (testRead, testUpdate) I have noticed that the error message is the following:"Doesn't match the serialized representation".<br/>
+
While debugging some unit test (testRead, testUpdate) I have noticed that the error message is the following:"Doesn't match the serialized representation".<br/>
 
I checked the data and in xml file and the one I get when running the composed query in PostgreSQL. They are identical.<br/>
 
I checked the data and in xml file and the one I get when running the composed query in PostgreSQL. They are identical.<br/>
 
I run the same tests in MySQL: I got the same data. The only difference is the order of raws, so I figured it has something to do with default ordering in PostgreSQL:<br/>
 
I run the same tests in MySQL: I got the same data. The only difference is the order of raws, so I figured it has something to do with default ordering in PostgreSQL:<br/>
 
   The null value sorts higher than any other value. In other words,    with ascending sort order, null values sort at the end, and with    descending sort order, null values sort at the beginning.<br/> If not specified, '''<tt>ASC</tt>''' is    assumed by '''default'''.<br/>
 
   The null value sorts higher than any other value. In other words,    with ascending sort order, null values sort at the end, and with    descending sort order, null values sort at the beginning.<br/> If not specified, '''<tt>ASC</tt>''' is    assumed by '''default'''.<br/>
 
This explains why testUpdates gives the specified message, and I guess we have the same issue when we are trying to read '''without order by''' clause
 
This explains why testUpdates gives the specified message, and I guess we have the same issue when we are trying to read '''without order by''' clause

Revision as of 15:43, 17 February 2011

While debugging some unit test (testRead, testUpdate) I have noticed that the error message is the following:"Doesn't match the serialized representation".
I checked the data and in xml file and the one I get when running the composed query in PostgreSQL. They are identical.
I run the same tests in MySQL: I got the same data. The only difference is the order of raws, so I figured it has something to do with default ordering in PostgreSQL:

  The null value sorts higher than any other value. In other words,     with ascending sort order, null values sort at the end, and with     descending sort order, null values sort at the beginning.
If not specified, ASC is assumed by default.

This explains why testUpdates gives the specified message, and I guess we have the same issue when we are trying to read without order by clause