Thread: pgsql/src/backend/postmaster postmaster.c

pgsql/src/backend/postmaster postmaster.c

From
tgl@postgresql.org
Date:
CVSROOT:    /cvsroot
Module name:    pgsql
Changes by:    tgl@postgresql.org    01/11/06 13:02:48

Modified files:
    src/backend/postmaster: postmaster.c

Log message:
    Clean up formatting of child process exit-status reports so that they
    are correct, consistent, and complete ... motivated by gripe from
    Oliver Elphick, but I see someone had already made an incomplete stab
    at this.


Re: pgsql/src/backend/postmaster postmaster.c

From
Peter Eisentraut
Date:
tgl@postgresql.org writes:

>     Clean up formatting of child process exit-status reports so that they
>     are correct, consistent, and complete ... motivated by gripe from
>     Oliver Elphick, but I see someone had already made an incomplete stab
>     at this.

Sorry, this sort of thing doesn't work with message internationalization.
I suggest you revert this and fix the one remaining message in the style
the other ones are in.

--
Peter Eisentraut   peter_e@gmx.net


Re: pgsql/src/backend/postmaster postmaster.c

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Sorry, this sort of thing doesn't work with message internationalization.

Why not?  Certainly the messages are in two parts, but I doubt there is
any language with grammar so irregular that it can't be made to work.

> I suggest you revert this and fix the one remaining message in the style
> the other ones are in.

If it were only the one erroneous message, I wouldn't have troubled.
But there were four (soon to be five) places that all had the same
problem, ie failure to cover the "can't happen" case.  Repeating that
logic five times, producing fifteen somewhat-redundant error messages
to translate, didn't seem like a win.  Especially not when I fully
expect there to be some #ifdefs in there soon to cover platforms that
don't have WIFEXITED and friends.  The code as committed has one place
to fix such problems, not five.

I thought about alternative strategies like passing the noun phrase into
the formatExitStatus subroutine, but that didn't seem materially better.
Can you give a concrete example of a language where this really doesn't
work, keeping in mind that the original isn't exactly the Queen's
English either?

            regards, tom lane