Re: Is it safe to ignore the return value of SPI_finish andSPI_execute? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Is it safe to ignore the return value of SPI_finish andSPI_execute?
Date
Msg-id 20190611190356.GA27130@alvherre.pgsql
Whole thread Raw
In response to Re: Is it safe to ignore the return value of SPI_finish and SPI_execute?  (Mark Dilger <hornschnorter@gmail.com>)
List pgsql-hackers
On 2019-May-22, Mark Dilger wrote:

> On Wed, May 22, 2019 at 1:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> > Figuring out what fraction
> > that should be is part of the work --- but just in a quick scan through
> > spi.c, it seems like there might be a case for deprecating practically
> > all the SPI_ERROR_xxx codes except for SPI_ERROR_NOATTRIBUTE.
> > I'd definitely argue that SPI_ERROR_UNCONNECTED and SPI_ERROR_ARGUMENT
> > deserve that treatment.
> >
> > I'm for it, if you want to do the work, but I don't speak for everybody.
> 
> I do want to write the patch, but I'll wait for other opinions.

In my perusal, the SPI API is unnecessarily baroque and could stand some
simplification, so +1 for the proposed approach.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Jan Chochol
Date:
Subject: Re: Fix order of steps in DISCARD ALL documentation
Next
From: Dave Cramer
Date:
Subject: Re: Binary support for pgoutput plugin