You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Don't bother checking the result of SPI_connect[_ext] anymore.
SPI_connect/SPI_connect_ext have not returned any value other thanSPI_OK_CONNECT since commit1833f1a in v10; any errors are thrownvia ereport. (The most likely failure is out-of-memory, which hasalways been thrown that way, so callers had better be prepared forsuch errors.) This makes it somewhat pointless to check thesefunctions' result, and some callers within our code haven't beenbothering; indeed, the only usage example within spi.sgml doesn'tbother. So it's likely that the omission has propagated intoextensions too.Hence, let's standardize on not checking, and document the returnvalue as historical, while not actually changing these functions'behavior. (The original proposal was to change their return typeto "void", but that would needlessly break extensions that areconforming to the old practice.) This saves a small amount ofboilerplate code in a lot of places.Stepan NeretinDiscussion:https://postgr.es/m/CAMaYL5Z9Uk8cD9qGz9QaZ2UBJFOu7jFx5Mwbznz-1tBbPDQZow@mail.gmail.com