From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Logical Replication - detail message with names of missing columns |
Date: | 2020-09-11 14:52:23 |
Message-ID: | 374158.1599835943@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Matthias van de Meent | 2020-09-11 14:57:36 | [patch] _bt_binsrch* improvements - equal-prefix-skip binary search |
Previous Message | Ranier Vilela | 2020-09-11 14:50:37 | Simplified version of read_binary_file (src/backend/utils/adt/genfile.c) |