group by

Поиск
Список
Период
Сортировка
От YourSoft
Тема group by
Дата
Msg-id 4465DB57.1000406@freemail.hu
обсуждение исходный текст
Ответы Re: group by  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Dear Developers,

There is a possible bug in 'select ... group by' SQL.
I reported it on the bugreport form on the web. (I think it number is
2416?). But no any reaction to it.
It is not problem for me, I make my results in other way. But it is
possible problem for other pepoples.

I reproduced it in smaller database table in other way. (with 180000
records) (postgresql 8.03 on linux)
e.g.:
there is a table:
stat-# \d summary
            Table "public.summary"
  colum   |         Type          | Módosító
-----------+------------------------+----------
 kifejezes | character varying(300) | not null
 cnt       | integer                | not null
 talalat   | integer                |
Indexes:
    "idx_summary_cnt" btree (cnt) CLUSTER
    "idx_summary_kifejezes" btree (kifejezes text_pattern_ops)

1)
select kifejezes, count(kifejezes) from summary group by kifejezes
having count(kifejezes)>1;
the result is:
        kifejezes        | count
-------------------------+-------
 csúcscsajok             |     2
 jászszentandrás         |     3
 kullancscsípés          |     2
 magannyugdijpenztar     |     2
 magánnyugdijpénztár     |     2
 magánnyugdíjpénztár     |     3
 magánnyugdíjpénztárak   |     2
 művelÅdésszociológia    |     2
 otp magánnyugdíjpénztár |     2
(9 rows)

2)
select * from summary where kifejezes like 'jegygy%';
  kifejezes  | cnt | talalat
------------+-----+---------
 jegygyürű  |   4 |       0
 jegygyűrű  |   5 |       0
 jegygyűrű  |   7 |       0
 jegygyűrű  |  12 |       0
 jegygyűrűk |   3 |       0
(5 rows)


Why not is in the first query results the "jegygyűrű" (second query
rows )?

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Douglas Toltzman
Дата:
Сообщение: Re: backup database by pg_dump
Следующее
От: Tom Lane
Дата:
Сообщение: Re: group by