Re: Logical Replication - detail message with names of missing columns - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Logical Replication - detail message with names of missing columns
Date
Msg-id 374158.1599835943@sss.pgh.pa.us
Whole thread Raw
In response to Re: Logical Replication - detail message with names of missing columns  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Logical Replication - detail message with names of missing columns  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2020-Sep-11, Tom Lane wrote:
>> NO.  The convention is to write \"...\" in the translatable message.

> There is a problem here though, which is that the quoted strings in
> question are part of a list of columns.  There's no way to keep that
> list as a translatable string, so that approach doesn't work here.
> What appears in the translatable string is:

> logical replication target relation "%s" is missing replicated columns: %s

Check, but you could imagine that the column-list string is constructed
with code along the lines of

    if (first)
        appendStringInfo(buf, _("\"%s\""), colname);
    else
        appendStringInfo(buf, _(", \"%s\""), colname);

thus allowing a translator to replace the quote marks.  Might not be
worth the trouble.  In any case, the point here is that we're not
trying to construct valid SQL so quote_identifier is not the right
tool for the job.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)
Next
From: Matthias van de Meent
Date:
Subject: [patch] _bt_binsrch* improvements - equal-prefix-skip binary search