pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Improve wording of some pg_upgrade failure reports.
3+ messages / 2 participants
[nested] [flat]

* pgsql: Improve wording of some pg_upgrade failure reports.
@ 2021-04-29 19:40  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2021-04-29 19:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve wording of some pg_upgrade failure reports.

Don't advocate dropping a whole table when dropping a column would
serve.  While at it, try to make the layout of these messages a
bit cleaner and more consistent.

Per suggestion from Daniel Gustafsson.  No back-patch, as we generally
don't like to churn translatable messages in released branches.

Discussion: https://postgr.es/m/2798740.1619622555@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c9c37ae03fea0c8ad467392ddf03940b61974935

Modified Files
--------------
src/bin/pg_upgrade/check.c   | 10 +++++-----
src/bin/pg_upgrade/version.c | 26 ++++++++++++++------------
2 files changed, 19 insertions(+), 17 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Improve wording of some pg_upgrade failure reports.
@ 2021-05-12 22:05  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Eisentraut @ 2021-05-12 22:05 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org


On 29.04.21 21:40, Tom Lane wrote:
> Improve wording of some pg_upgrade failure reports.
> 
> Don't advocate dropping a whole table when dropping a column would
> serve.  While at it, try to make the layout of these messages a
> bit cleaner and more consistent.

I don't understand how this makes the message layout cleaner.  For example, this

@@ -456,10 +458,10 @@ old_11_check_for_sql_identifier_data_type_usage(ClusterInfo *cluster)
                                   output_path))
     {
         pg_log(PG_REPORT, "fatal\n");
-       pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables\n"
-                "and/or indexes.  The on-disk format for this data type has changed, so this\n"
-                "cluster cannot currently be upgraded.  You can remove the problem tables or\n"
-                "change the data type to \"name\" and restart the upgrade.\n"
+       pg_fatal("Your installation contains the \"sql_identifier\" data type in user tables.\n"
+                "The on-disk format for this data type has changed, so this\n"
+                "cluster cannot currently be upgraded.  You can\n"
+                "drop the problem columns and restart the upgrade.\n"
                  "A list of the problem columns is in the file:\n"
                  "    %s\n\n", output_path);

turns a message with uniform line length layout into a message with random line lengths.
What is the rationale behind this?





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Improve wording of some pg_upgrade failure reports.
@ 2021-05-12 22:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2021-05-12 22:14 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: pgsql-committers@lists.postgresql.org

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 29.04.21 21:40, Tom Lane wrote:
>> Don't advocate dropping a whole table when dropping a column would
>> serve.  While at it, try to make the layout of these messages a
>> bit cleaner and more consistent.

> I don't understand how this makes the message layout cleaner.

The main thing that's cleaner IMO is that it's separated what one
could call the primary error message ("Your installation contains FOO.")
from the errdetail, which formerly was run onto the same line in
some cases, but not others.

For translatability purposes, maybe we could consider how to split
those texts into separate message strings for each sentence?  The
detail text is pretty nearly boilerplate and could be unified,
I suspect.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-05-12 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 19:40 pgsql: Improve wording of some pg_upgrade failure reports. Tom Lane <tgl@sss.pgh.pa.us>
2021-05-12 22:05 ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2021-05-12 22:14   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox