On 2023-01-23 14:40, Hayato Kuroda (Fujitsu) wrote:
> Dear Ted,
>
> Thanks for reviewing! PSA new version.
>
>> For v25-0001-Add-PQConnCheck-and-PQCanConnCheck-to-libpq.patch ,
>> `pqConnCheck_internal` only has one caller which is quite short.
>> Can pqConnCheck_internal and PQConnCheck be merged into one func ?
>
> I divided the function for feature expandability. Currently it works
> on linux platform,
> but the limitation should be removed in future and internal function
> will be longer.
> Therefore I want to keep this style.
>
>> +int
>> +PQCanConnCheck(void)
>>
>> It seems the return value should be of bool type.
>
> I slightly changed the returned value like true/false. But IIUC libpq
> functions
> cannot define as "bool" datatype. E.g. PQconnectionNeedsPassword()
> returns true/false,
> but the function is defined as int.
>
> Best Regards,
> Hayato Kuroda
> FUJITSU LIMITED
Thank you for updating the patch!
+/* Check whether the postgres server is still alive or not */
+extern int PQConnCheck(PGconn *conn);
+extern int PQCanConnCheck(void);
Aren't these PQconnCheck and PQcanConnCheck? I think the first letter
following 'PQ' should be lower case.
regards.
--
Katsuragi Yuta
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION