Re: Problem with dblink

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Andrea Grassi <andreagrassi(at)sogeasoft(dot)com>, Darko(dot)Prenosil(at)finteh(dot)hr, shridhar_daithankar(at)persistent(dot)co(dot)in
Subject: Re: Problem with dblink
Date: 2003-11-30 00:00:49
Message-ID: 3FC93331.8070305@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

>>Tom Lane wrote:
>>>(More generally, I wonder if AtEOXact_SPI oughtn't be fixed to emit
>>>a WARNING if the SPI stack isn't empty, except in the error case.
>>>Neglecting SPI_finish is analogous to a resource leak, and we have
>>>code in place to warn about other sorts of leaks.)

Is the attached what you had in mind? The original problem function
would now look like:

SELECT dblink_build_sql_insert('foo','1 2',2,'{"0", "a"}','{"99", "xyz"}');
WARNING: freeing non-empty SPI stack
HINT: Check for missing "SPI_finish" calls
dblink_build_sql_insert
-----------------------------------------------------------
INSERT INTO foo(f1,f2,f3) VALUES('99','xyz','{a0,b0,c0}')
(1 row)

Joe

Attachment Content-Type Size
spi-no-finish.patch text/plain 3.2 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2003-11-30 00:28:38 Re: pg_autovacuum patches
Previous Message Joe Conway 2003-11-29 21:52:57 PG_VERSION in pg_config.h.win32