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

From Alvaro Herrera
Subject Re: Logical Replication - detail message with names of missing columns
Date
Msg-id 20200911143546.GA23894@alvherre.pgsql
Whole thread Raw
In response to Re: Logical Replication - detail message with names of missing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Logical Replication - detail message with names of missing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2020-Sep-11, Tom Lane wrote:

> > How about quoting all the individual columns? Looks like quote_identifier()
> > doesn't serve our purpose here as it selectively quotes or quotes all
> > identifiers only in case quote_all_identifiers config variable is set.
> 
> NO.  The convention is to write \"...\" in the translatable message.
> Not all languages use double quote symbols for this purpose, so that
> way lets translators replace them with something else.
> 
> Yeah, this means that messages containing names that contain double
> quotes might be a bit ambiguous.  We live with it.

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

Or in the singular case:
logical replication target relation "%s" is missing replicated columns: %s

where the second %s is the list of columns.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Logical Replication - detail message with names of missing columns
Next
From: Ranier Vilela
Date:
Subject: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)