Robert Haas escribió:
> The fact that there are no tests of this functionality is probably not
> a good thing. We should add some. At the moment, the following test
> case crashes, and it looks like this commit is responsible:
>
> create table test_update2 (id integer);
> DECLARE test_update_cursor CURSOR FOR SELECT id, MIN(id) FROM
> test_update2 GROUP By id HAVING MIN(id) < 1 FOR UPDATE;
The attached patch fixes it, and I think it makes more sense than the
original coding to start with.
I will commit this tomorrow, adding a few test cases while at it.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services