Re: *_to_xml() should copy SPI_processed/SPI_tuptable - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: *_to_xml() should copy SPI_processed/SPI_tuptable
Date
Msg-id 87va7is6a8.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: *_to_xml() should copy SPI_processed/SPI_tuptable  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: *_to_xml() should copy SPI_processed/SPI_tuptable  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> Also, in further service of providing insulation between SPI
 Tom> nesting levels, I thought it'd be a good idea for SPI_connect() to
 Tom> reset the globals to zero/NULL after saving them. This ensures
 Tom> that a nesting level can't accidentally be affected by the state
 Tom> of an outer level. It's barely possible that there's somebody out
 Tom> there who's *intentionally* accessing state from a calling SPI
 Tom> level, but that seems like it'd be pretty dangerous programming
 Tom> practice. Still, maybe there's an argument for omitting that hunk
 Tom> in released branches.

 Tom> Comments?

+1 to backpatching it all, including the initialization in SPI_connect.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: *_to_xml() should copy SPI_processed/SPI_tuptable
Next
From: Michael Paquier
Date:
Subject: Commit fest 2018-09