Re: BUG #13811: Default ordering colums

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: exru(at)mail(dot)ru
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13811: Default ordering colums
Date: 2015-12-10 20:59:18
Message-ID: CAKFQuwYLfW+R6=VaRDztp--ocE-cW4LwVi3p7caFMgxgR8q98g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Dec 10, 2015 at 5:52 AM, <exru(at)mail(dot)ru> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 13811
> Logged by: Vyacheslav
> Email address: exru(at)mail(dot)ru
> PostgreSQL version: 9.4.5
> Operating system: Debian 8.1
> Description:
>
>
> 0;"Аукцион1";1;1;"Аукцион0";5;"2015-12-10 15:38:00";"";-1
> 1;"Аукцион1";-1;1;"Аукцион1";5;"2015-12-10 15:38:00";"";0
> 2;"Аукцион2";1;1;"Аукцион2";5;"2015-12-10 15:38:00";"";1
> 3;"Аукцион3";1;1;"Аукцион3";5;"2015-12-10 15:38:00";"";1
> 4;"Аукцион4";1;1;"Аукцион4";7;"2015-12-10 15:38:00";"";3
> 5;"Аукцион5";1;1;"Аукцион5";5;"2015-12-10 15:38:00";"";4
> 6;"Аукцион6";1;1;"Аукцион6";6;"2015-12-10 15:38:00";"";5
> 7;"Аукцион7";-1;1;"Аукцион7";6;"2015-12-10 15:38:00";"";6
> 8;"Аукцион7";1;1;"Аукцион7";7;"2015-12-10 15:38:00";"";7
>

> ​<do stuff here>
>

>
> 1;"Аукцион1";-1;1;"Аукцион1";5;"2015-12-10 15:38:00";"";0
> 2;"Аукцион2";1;1;"Аукцион2";5;"2015-12-10 15:38:00";"";1
> 3;"Аукцион3";1;1;"Аукцион3";5;"2015-12-10 15:38:00";"";1
> 4;"Аукцион4";1;1;"Аукцион4";7;"2015-12-10 15:38:00";"";3
> 5;"Аукцион5";1;1;"Аукцион5";5;"2015-12-10 15:38:00";"";4
> 6;"Аукцион6";1;1;"Аукцион6";6;"2015-12-10 15:38:00";"";5
> 7;"Аукцион7";-1;1;"Аукцион7";6;"2015-12-10 15:38:00";"";6
> 8;"Аукцион7";1;1;"Аукцион7";7;"2015-12-10 15:38:00";"";7
> 0;"Аукцион1";1;1;"Аукцион0";5;"2015-12-10 15:38:00";"";-1
>
>
> 4) There is no any orders by or any changes in sequences. Why do that?
>

​Why questions are not typically bugs, and this one definitely is not, but
anyway...

Q: ​Why does the order change?​
A: Because the executor wasn't told to care about order in the query and
this is what came through naturally.

Also, updating a row, even if you do not change the actual values of the
any of columns, still causes the system to perform a delete/insert pair (in
MVCC terms). The row with ID 0 in the first result is physically different
than the one returned in the second result.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-12-10 21:18:55 Re: BUG #13812: 'now' acting differently than now() in function
Previous Message John R Pierce 2015-12-10 20:52:39 Re: BUG #13811: Default ordering colums