the bug #7499 is not more a bug, but my missunderstanding (RESOLVED INVALID) - Mailing list pgsql-bugs

From Denis Kolesnik
Subject the bug #7499 is not more a bug, but my missunderstanding (RESOLVED INVALID)
Date
Msg-id CAHYNDb-Auo0hw=REK3m4QO0q3+=V1gMkqyLXvjfcKeS_n+THeA@mail.gmail.com
Whole thread Raw
List pgsql-bugs
the bug #7499 is not more a bug, but my missunderstanding (RESOLVED INVALID)
My arguments are:


> create table tbl_test
>  (id int not null primary key,
>   str_last_name text not null,
>   misc text);
> insert into tbl_test values
>  (1, 'Kolesnik'),
>  (83, 'GXXXXXXXXX'),
>  (111, 'Kolesnik'),
>  (175, 'GXXXXXXXXX');
> select id, str_last_name from tbl_test
>  where id in (83,175,111,1) order by str_last_name;
> update tbl_test set misc = 'x' where id = 1;
> select id, str_last_name from tbl_test
>  where id in (83,175,111,1) order by str_last_name;
> analyze tbl_test;
> select id, str_last_name from tbl_test
>  where id in (83,175,111,1) order by str_last_name;

here you are right:

after "analyze tbl_test;"

the records with the str_last_name with value Kolesnik sorted now in
different order and
for the last name GXXXXXXXXX works the same.

>No, it asked to specify ORDER BY such that it "constrains the result
>rows into a unique order" -- which you are not doing in your
>examples.  That is exactly what you *should* do to get the results
>you want.

here you are right also, because it seems now, that if "order by id" is missing
then data results of a query could vary depending on changes to a
record done(or other
algorythms).


Lets close this bug.

With deep respect,
Denis Kolesnik.

pgsql-bugs by date:

Previous
From: matthew.p.kusnierz@jpmorgan.com
Date:
Subject: BUG #7501: Unique index fails to check uniqueness on nulls
Next
From: tigran.mkrtchyan@desy.de
Date:
Subject: BUG #7502: ALTER COLUMN TYPE processed even if column type matches