Re: Default ordering option

2019-07-26 Thread Cyril Champier
l 26, 2019 at 9:53 AM Cyril Champier > wrote: > > > > Adrian: > > > >> Are you really looking for a pseudo-random name? > > > > > > No, the code I pasted was an existing production bug: the last_name > should have been unique, so the selected pa

Re: Default ordering option

2019-07-26 Thread Cyril Champier
19 at 4:55 PM Adrian Klaver wrote: > On 7/25/19 12:43 AM, Cyril Champier wrote: > > *Adrian*: > > > > If order is not an issue in the production code why test for it in > the > > test code? > > > > > > In many cases, it would not be a pr

Re: Default ordering option

2019-07-25 Thread Cyril Champier
ntr...@2ndquadrant.com> wrote: > On 2019-07-25 09:43, Cyril Champier wrote: > > It might be an interesting exercise to implement this as a > post-parsing > > hook. > > > > > > I known nothing about that, but that sounds interesting, do you have any >

Re: Default ordering option

2019-07-25 Thread Cyril Champier
but that sounds interesting, do you have any documentation pointer to help me implement that? On Wed, Jul 24, 2019 at 10:36 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2019-07-23 17:43, Cyril Champier wrote: > > In this documentation > > <https:

Re: Default ordering option

2019-07-24 Thread Cyril Champier
the to_sql method. On Wed, Jul 24, 2019 at 4:48 PM Adrian Klaver wrote: > On 7/24/19 1:45 AM, Cyril Champier wrote: > > Thanks for your answers. > > Unfortunately the update trick only seems to work under certain > conditions. > > > > I do this to shuffle

Re: Default ordering option

2019-07-24 Thread Cyril Champier
cannot blindly add 'ORDER BY random()' to every select, because of the incompatibility with distinct and union, and the way we use our orm. On Wed, Jul 24, 2019 at 3:54 AM Ian Barwick wrote: > On 7/24/19 2:23 AM, Adrian Klaver wrote: > > On 7/23/19 8:43 AM, Cyril Champier

Default ordering option

2019-07-23 Thread Cyril Champier
Hi, In this documentation , it is said: > If sorting is not chosen, the rows will be returned in an unspecified > order. The actual order in that case will depend on the scan and join plan > types and the order on disk, but it must not be re