Bug regarding update.. from and aggregates ?

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Bug regarding update.. from and aggregates ?
Дата
Msg-id 42B2D986.9020909@phlo.org
обсуждение исходный текст
Ответы Re: Bug regarding update.. from and aggregates  (Andreas Pflug <pgadmin@pse-consulting.de>)
Список pgadmin-hackers
Hi

When executing the following statements:
create schema bugtest ;
drop table bugtest.t1 ;
drop table bugtest.t2 ;
create table bugtest.t1(id int4, maximum int4, dummy int4) ;
create table bugtest.t2(id int4, entry int4) ;
insert into bugtest.t1 (id) values (1) ;
insert into bugtest.t1 (id) values (2) ;
insert into bugtest.t2 (id, entry) values (1, 1) ;
insert into bugtest.t2 (id, entry) values (1, 2) ;
insert into bugtest.t2 (id, entry) values (2, 3) ;
insert into bugtest.t2 (id, entry) values (2, 4) ;
update bugtest.t1 set maximum = max(t2.entry) from bugtest.t2
    where t1.id = t2.id ;

The last update given "One row affected" - and indeed, t1 looks
like this after the update:
id | maximum
1  | 4
2  | <NULL>

While I would expect:
id | maximum
1  | 2
2  | 4

Is this I bug, or is the observed behaviour actually intended?

greetings, Florian Pflug



Вложения

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

Предыдущее
От: svn@pgadmin.org
Дата:
Сообщение: SVN Commit by andreas: r4310 - trunk/pgadmin3/src/dlg
Следующее
От: svn@pgadmin.org
Дата:
Сообщение: SVN Commit by andreas: r4311 - trunk/pgadmin3/xtra/pgagent