Re: sorting problem with distinct on()

2023-05-05 Thread Tom Lane
"David G. Johnston" writes: > On Fri, May 5, 2023 at 6:55 AM Sky Lendar wrote: >> Notice that 12 is missing in the list. > Since your DISTINCT ON *subquery* doesn't specify an ordering which of > those two are chosen as the representative record for M31 is > non-determinstic. > If you want to e

Re: sorting problem with distinct on()

2023-05-05 Thread Sky Lendar
Thank you for the clarification. Le ven. 5 mai 2023 à 16:16, David G. Johnston a écrit : > On Fri, May 5, 2023 at 6:55 AM Sky Lendar wrote: > >> Hi there ans thx for reading and answering this post if you can: >> >> Let's regard an example of a table (stars) containing a code for a star >> (sym

Re: sorting problem with distinct on()

2023-05-05 Thread David G. Johnston
On Fri, May 5, 2023 at 6:55 AM Sky Lendar wrote: > Hi there ans thx for reading and answering this post if you can: > > Let's regard an example of a table (stars) containing a code for a star > (symb) > and its index (nb) in a file. > > > nb |symb > + > 0 | alTau > 1 | al

sorting problem with distinct on()

2023-05-05 Thread Sky Lendar
Hi there ans thx for reading and answering this post if you can: Let's regard an example of a table (stars) containing a code for a star (symb) and its index (nb) in a file. nb |symb + 0 | alTau 1 | alTau 2 | bePer 3 | alSco 4 | alLeo 5 | alCMa 6 | alVir 7 |