Re: [web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Eliezer (Vlad) Tseytkin
Got it, Thank you very much On Tue, Jun 18, 2019, 1:53 PM Anthony wrote: > On Tuesday, June 18, 2019 at 11:04:16 AM UTC-4, Vlad wrote: >> >> Anthony, it works like a charm, thank you very much!! >> >> (Val's solution with also worked great, but it felt awkward to use the >> whole thing when an a

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Anthony
On Tuesday, June 18, 2019 at 11:04:16 AM UTC-4, Vlad wrote: > > Anthony, it works like a charm, thank you very much!! > > (Val's solution with also worked great, but it felt awkward to use the > whole thing when an alias was created, so emotionally this solution with > alias feels better :) > Y

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Vlad
Anthony, it works like a charm, thank you very much!! (Val's solution with also worked great, but it felt awkward to use the whole thing when an alias was created, so emotionally this solution with alias feels better :) On a side note, for SQLite orderby=['~shares'] works perfect - it indeed

[web2py] Re: orderby=['alias'] - works in sqlite, but not in postgres

2019-06-18 Thread Anthony
In SQLite, the tilde (~) is a unary operator used for bitwise negation. If used as a prefix for an order by column, SQLite will not throw an error (as it is a valid operator), but nor will sort they way you expect. In Postgres, the tilde is not a unary operator but a regular expression operator