Re: UPDATE crash in HEAD and 8.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UPDATE crash in HEAD and 8.1
Дата
Msg-id 1049.1150839488@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UPDATE crash in HEAD and 8.1  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: UPDATE crash in HEAD and 8.1
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> I'm fairly sure this query is illegal per spec.  There are ancient
>> discussions in the archives about whether aggregates in an UPDATE target
>> list can have a consistent interpretation or not.  We never found one,
>> but never got around to disallowing it either.  Maybe it's time.  If you
>> try it with something like sum() you don't get a crash, but you do get
>> rather bizarre behavior.

> Yeah, I agree we should disallow it.  For the curious, the bizarre behavior
> is

> alvherre=# update pk set id = count(id) ;
> ERROR:  ctid is NULL

Hmm, what version are you testing?  What I see is that it updates a
single one of the table rows :-(

I found the previous discussion (or one such, anyway):

http://archives.postgresql.org/pgsql-bugs/2000-07/msg00046.php

That message mentions "ctid is NULL" in the context of a join update,
but for the single-table case, all the versions I've tried seem to do
the other thing.  It's pretty broken either way of course ...
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: trivial DoS on char recoding
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: UPDATE crash in HEAD and 8.1