| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: UPDATE crash in HEAD and 8.1 |
| Date: | 2006-06-20 21:43:20 |
| Message-ID: | 20060620214320.GK26882@surnet.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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 :-(
The trick seems to be that the table must be empty. I'm doing this in
8.1.3.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2006-06-20 21:45:58 | Re: trivial DoS on char recoding |
| Previous Message | Tom Lane | 2006-06-20 21:38:08 | Re: UPDATE crash in HEAD and 8.1 |