"Florian Nigsch" <contact(at)flo(dot)nigsch(dot)com> writes:
> The following rapidly consumes server memory:
> -- Causes leak:
> SET client_encoding TO 'WIN1252';
> BEGIN;
> CREATE TEMP TABLE t1(pk INT PRIMARY KEY);
> -- Repeat 1000 times
> DECLARE mycur CURSOR WITH HOLD FOR SELECT * FROM t1;
> FETCH 100 IN mycur;
> SAVEPOINT mysp;
> CLOSE mycur;
> RELEASE mysp;
> -- End repeat
I've applied a patch for this, but I have to say that using a SAVEPOINT
around a CLOSE is an awfully expensive use of a savepoint. You might
want to nag the psqlodbc people to see if they can't avoid that.
regards, tom lane