From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #8448: looping through query results exits at 10th step under some conditions |
Date: | 2013-11-12 21:34:53 |
Message-ID: | 1384292093855-5777999.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane-2 wrote
> 1. Leave the code alone, but document that the prefetching behavior
> exists.
> Users who run into this are on their own to work around it.
1a. Leave the code alone and expect that occasionally users will encounter
this problem, post to the bugs/general list, and the community helps them
figure out how to overcome the problem in their specific case.
Even though the OPs test case proves the bug exists the fact that it makes
no sense indeed makes it hard to get excited about proactively preventing
this situation. Convention for updating within a loop is that you'd update
the current record on each iteration - not past or future records (which is
happening implicitly here because of the CROSS JOIN). A proper update
statement, possibly with a RETURNING clause, is often going to be the better
solution anyway.
So, is there an underlying use-case driving this complaint that should be
considered by the community either to induce a fix to the behavior or just
to solicit suggestions for better alternatives?
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-8448-looping-through-query-results-exits-at-10th-step-under-some-conditions-tp5770594p5777999.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-11-12 22:00:40 | Re: BUG #8588: Need work arounds for Apple unaligned access |
Previous Message | Tom Lane | 2013-11-12 19:40:10 | Re: BUG #8448: looping through query results exits at 10th step under some conditions |