On Wed, Aug 17, 2022 at 09:53:45AM +0200, Drouvot, Bertrand wrote: > Thanks for the new version! > > + /* Copy authn_id into the space after the struct. */ > + if (serialized.authn_id_len >= 0) > > Maybe remove the "." at the end of the comment? (to be consistent with the > other comment just above)
When it comes to such things, I usually apply the rule of consistency with the surroundings, which sounds right here. > + memcpy(&serialized, conninfo, sizeof(serialized)); > + authn_id = conninfo + sizeof(serialized); > > Move "authn_id = conninfo + sizeof(serialized)" in the "if > (serialized.authn_id_len >= 0)" below? Makes sense, so as never have something pointing to an area should should not look at. This should just be used when we know that there is going to be a string. > + src/backend/utils/init/miscinit.c:RestoreClientConnectionInfo(char > *conninfo) > + src/include/miscadmin.h:extern void RestoreClientConnectionInfo(char > *procinfo); > > conninfo in both to be consistent? Yep. Looks like a copy-pasto, seen from here. By the way, I have looked at the patch, tweaked a couple of things with comments and the style, but overval that's fine. First, I have intended to apply this stuff today but I have lacked the time to do so. I should be able to get this wrapped tomorrow, though. -- Michael
signature.asc
Description: PGP signature