Re: SPI return

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Patrick Handja <patrick(dot)bungama(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SPI return
Date: 2021-03-04 23:06:08
Message-ID: 1425389.1614899168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Patrick Handja <patrick(dot)bungama(at)gmail(dot)com> writes:
> I am not able to get the array returned by get_tuples function, and I am
> thinking it's SPI_finish(). When I tried to print my array tuples itens
> after SPI_finish(), It is not working.

Indeed, SPI_finish() frees everything that was allocated by SPI functions,
including result tuple tables. You need to do whatever it is you want
to do with the tuples before calling SPI_finish.

regards, tom lane

In response to

  • SPI return at 2021-03-04 22:42:02 from Patrick Handja

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2021-03-04 23:08:37 Re: PROXY protocol support
Previous Message Tom Lane 2021-03-04 23:03:43 Re: libpq debug log