Re: ERROR: ExecEvalAggref

Поиск
Список
Период
Сортировка
Искать
От
eric soroos
Тема
Re: ERROR: ExecEvalAggref
Дата
Msg-id
94844485.1168286372@[4.42.179.151]
Ответ на
Список
Дерево обсуждения
ERROR: ExecEvalAggref eric soroos <eric-psql@soroos.net>
Re: ERROR: ExecEvalAggref Tom Lane <tgl@sss.pgh.pa.us>
Re: ERROR: ExecEvalAggref eric soroos <eric-psql@soroos.net>

> In general, aggregates at the top level of an UPDATE are ill-defined
> (the SQL spec prohibits them outright, and probably we should too).

In cases like this, it's probably better if it had never worked rather than failing for no apparent reason once it got into production. 

> You will perhaps have better luck with a query structured like
> 
> 	update dl_profile set
> 	city = (select profiler(...) from ... where FOO)
> 	where BAR

I've recast this as the following to allow for more fields without adding a subselect for each field. 

update dl_profile set 
    _incomingSubject= calc._incomingSubject 
     ...
from (select 
    profiler(concat(dl_event._eventDate,dl_event._incomingSubject) as _incomingSubject
     ... 
    from dl_event where dl_event._donorNum='6' 
                        and dl_event._flDeleted='f'
    ) as calc 
where dl_profile._donorNum='6';


This is working now, thanks for the help.

eric



В списке pgsql-general по дате отправления
От: Neil Conway
Дата:
Сообщение: Re: Query gone wild
От: Richard A Lough
Дата:
Сообщение: Re: [NOVICE] Perl - Postgres
FAQ