From: | Stepan <sndcppg(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | SPI_connect, SPI_connect_ext return type |
Date: | 2024-08-10 13:55:46 |
Message-ID: | CAMaYL5Z9Uk8cD9qGz9QaZ2UBJFOu7jFx5Mwbznz-1tBbPDQZow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, hackers! If you look at the code in the src/backend/executor/spi.c file,
you will see the SPI_connect function familiar to many there, which
internally simply calls SPI_connect_ext. The return type is int, at the end
it says return SPI_OK_CONNECT;
It confuses me that nothing but OK, judging by the code, can return.(I
understand that earlier, before 1833f1a1, it could also return
SPI_ERROR_CONNECT). Therefore, I suggest making the returned value void
instead of int and not checking the returned value. What do you think about
this?
Best Regards, Stepan Neretin.
Attachment | Content-Type | Size |
---|---|---|
0001-Refactor-SPI_connect-and-SPI_connect_ext-functions-t.patch | text/x-patch | 12.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stepan | 2024-08-10 14:00:02 | Re: SPI_connect, SPI_connect_ext return type |
Previous Message | Kirill Reshke | 2024-08-10 13:40:00 | Re: [PATCH] Add log_transaction setting |