Re: Very misleading documentation for PQreset()

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Very misleading documentation for PQreset()
Date: 2021-01-22 06:32:03
Message-ID: 20210122063203.GA2108099@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 21, 2021 at 05:32:56PM -0500, Tom Lane wrote:
> I happened to notice that PQreset is documented thus:
>
> This function will close the connection to the server and attempt to
> reestablish a new connection to the same server, using all the same
> parameters previously used.
>
> Since we invented multi-host connection parameters, a reasonable person
> would assume that "to the same server" means we promise to reconnect to
> the same host we selected the first time. There is no such guarantee
> though; the new connection attempt is done just like the first one,
> so it will select the first suitable server in the list.
>
> I think we should just drop that phrase.

I agree that dropping the phrase strictly improves that documentation.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2021-01-22 06:36:48 Re: [PATCH] More docs on what to do and not do in extension code
Previous Message Corey Huinker 2021-01-22 06:22:07 Re: simplifying foreign key/RI checks