[Rt-devel] Sortorder of customfields

Jesse Vincent jesse at bestpractical.com
Fri Apr 28 11:01:31 EDT 2006


Joop van de Wege wrote:
> Hello All,
> 
> I have been reading up on SELECTs and ORDER BY and GROUP BY and having a
> chat with my DBA and we have come to the conclusion that the following
> piece of code from DBIx/SearchBuilder/Handle/Oracle.pm is plain wrong.
> sub DistinctQuery {
...

> }
> 
> We have no clue whatsoever where that comment about orderby not being
> the main table is going to need a groupby.
> This is atleast not true for Oracle 9i, never has been and can be
> removed.

I recall that this change was made at the request of a customer who had
an oracle sorting issue. I don't doubt your analysis at all. Alex, do
you remember the issue we were looking to solve with it?  Joop, do you
have a proposed patch?

> This solves the ordering problem with customfields with one side note
> that to be 100% sure that you get the desired order you would need to
> have the subselect in the order by clause, as explained in the previous
> post.
> 
> By looking at the svn repository I can see that 4254 is the last change
> and it was introduced then. Looks like it is verbatim copied from Pg.pm
> where this might be true.

I'm pretty sure it is, there.

> 
> Joop

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: OpenPGP digital signature
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060428/2870f9e4/signature.pgp


More information about the Rt-devel mailing list