-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 3 Feb 2009 20:24:06 +0100
Jan Pazdziora <jpazdzi...@redhat.com> wrote:

> On Tue, Feb 03, 2009 at 02:48:15PM -0400, Devan Goodwin wrote:
> >        FROM rhnSatelliteCert
> >       WHERE label = :label
> > - -     ORDER BY version DESC NULLS LAST
> > +     ORDER BY 
> > +         CASE WHEN version IS NULL
> > +            THEN -1 
> > +            ELSE version
> > +         END
> > +    DESC
> > 
> > Holler if you spot any problems.
> 
> Can't we just use those two fields, in the ORDER BY query?

What two fields?

> 
> I do not like that use of -1, which I assume is in the domain of
> the type of version. 

> It might work in this case now but it might
> confuse people reading the code five years from now, and it might
> confuse people who will be porting the NULLS LAST construct in
> situation when the value of choice will actually be a possible
> value of the column used.
> 

Could you rephrase the last part of this? 


Devan

- -- 
  Devan Goodwin <dgood...@redhat.com>
  Software Engineer     Spacewalk / RHN Satellite
  Halifax, Canada       650.567.9039x79267
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmIoWUACgkQAyHWaPV9my4/FACgpwcZoWV5lxwXZi28irjB8GzP
6CcAoMA3f3rIz/fFKRey8QUgn8o6mwF3
=C4Ti
-----END PGP SIGNATURE-----

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to