Introduce spi_xxx_or_error wrappers
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
I have seen that the pattern we follow to use `spi_execute` & `spi_finish` seems a lot similar in some places.
```c
if (spiResult != SPI_OK_UTILITY)
{
ereport(ERROR, (errmsg("could not run SPI query")));
}
if (spiResult != SPI_OK_FINISH)
{
ereport(ERROR, (errmsg("could not finish SPI connection")));
}
```
Might be better if we can introduce wrappers around spi_execute & spi_finish to automatically error out without doing those extra checks.
Contributor guide
Assessment
This issue has not been assessed yet.