Any reason why PQclear() do not assign the pointer to NULL?

Igor Korot <ikorot01@gmail.com>

From: Igor Korot <ikorot01@gmail.com>
To: "pgsql-generallists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2026-04-01T06:49:21Z
Lists: pgsql-general
Hi,
It only frees memory.

So the following code snippet will crash:

[code]
PQclear( res );
if( serverVersion > curremt_running_vrsion )
{
    res = PQprepare();
//* error checking*/
}
PQclear( res );
[/code]

Thank you.