public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Stepan <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: SPI_connect, SPI_connect_ext return type
Date: Sat, 10 Aug 2024 12:29:04 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwZLscENsYRvCAo5DqLAfD8zLNoA006JYuQCdXNOR2wvOw@mail.gmail.com>
References: <CAMaYL5Z9Uk8cD9qGz9QaZ2UBJFOu7jFx5Mwbznz-1tBbPDQZow@mail.gmail.com>
<[email protected]>
<CAKFQuwZLscENsYRvCAo5DqLAfD8zLNoA006JYuQCdXNOR2wvOw@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Saturday, August 10, 2024, Tom Lane <[email protected]> wrote:
>> That would break a lot of code (much of it not under our control) to
>> little purpose; it would also foreclose the option to return to using
>> SPI_ERROR_CONNECT someday.
> I suggest we document it as deprecated and insist any future attempt to
> implement a return-on-error connection function define a completely new
> function.
True; we're kind of in an intermediate place right now where certain
call sites aren't bothering to check the return code, but it's hard
to argue that they're really wrong --- and more to the point,
re-introducing use of SPI_ERROR_CONNECT would break them. I don't
know if that usage pattern has propagated outside Postgres core,
but it might've. Perhaps it would be better to update the docs to
say that the only return value is SPI_OK_CONNECT and all failure
cases are reported via elog/ereport.
regards, tom lane
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: SPI_connect, SPI_connect_ext return type
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox