Re: [PATCH v1] PQputCopyEnd never returns 0, fix the inaccurate comment

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH v1] PQputCopyEnd never returns 0, fix the inaccurate comment
Date: 2023-08-28 22:40:11
Message-ID: ZO0iS3xhGXL7h+6C@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 28, 2023 at 09:46:07PM +0800, Junwang Zhao wrote:
> Yeah, it makes sense to me, or maybe just `PQputCopyEnd(...) == -1`,
> let's wait for some other opinions.

One can argue that PQputCopyEnd() returning 0 could be possible in an
older version of libpq these callers are linking to, but this has
never existed from what I can see (just checked down to 8.2 now).
Anyway, changing these callers may create some backpatching conflicts,
so I'd let them as they are, and just fix the comment.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-08-28 22:53:37 Re: Wrong usage of pqMsg_Close message code?
Previous Message Michael Paquier 2023-08-28 22:32:59 Re: Commitfest manager for September