I'm sure someone on here can answer your question, I'm just curious how 
this relates to Elm ? Isn't this an Elixir related question ?

cheers
-magnus

On Monday, 31 October 2016 01:30:36 UTC+1, Jaroslaw Zabiello wrote:
>
> Why Ecto is  adding sort by rule for the column used in distinct?
>
> Repo.all(from b in Book, select: b.name, distinct: b.name, order_by: b.sort)
>
>
> SELECT DISTINCT ON (b0."name") b0."name" FROM "books" AS b0 ORDER BY 
> *b0."name",* b0."sort" []
>
>
> Repo.all(from b in Book, select: b.name, distinct: b.name, order_by: [b.sort, 
> b.name])
>
>
> SELECT DISTINCT ON (b0."name") b0."name" FROM "books" AS b0 ORDER BY* 
> b0."name"*, b0."sort", b0."name"
>
> It looks like a bug, isn't it?
>
> --
> JZ
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to