Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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: spi-no-finish.patch
Description: text/plain (3.2 KB)

In response to

Responses

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group