Re: BufFileRead() error signalling

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BufFileRead() error signalling
Date: 2020-01-28 20:51:54
Message-ID: CA+TgmobyrHM4ypoPwXDOu2faaOoM+v=_+GQ3krXbshrgDtVtKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 27, 2020 at 9:03 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> That's actually not the best fit, because this does not take care of
> the pluralization of the second message if you have only 1 byte to
> read ;)

But ... if you have only one byte to read, you cannot have a short read.

> A second point to take into account is that the unification of error
> messages makes for less translation work, which is always welcome.
> Those points have been discussed on this thread:
> https://www.postgresql.org/message-id/20180520000522.GB1603@paquier.xyz

I quickly reread that thread and I don't see that there's any firm
consensus there in favor of "read %d of %zu" over "read only %d of %zu
bytes". Now, if most people prefer the former, so be it, but I don't
think that's clear from that thread.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-01-28 20:52:36 Re: Removing pg_pltemplate and creating "trustable" extensions
Previous Message Robert Haas 2020-01-28 20:45:33 Re: Removing pg_pltemplate and creating "trustable" extensions