Re: More on elog and error codes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: More on elog and error codes
Date
Msg-id 18631.985239348@sss.pgh.pa.us
Whole thread Raw
In response to Re: More on elog and error codes  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: More on elog and error codes  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> This is a problem, I agree - but a procedural one. We need to make
> registering messages easy. To do this, rather than having a central message
> file, perhaps do the following:

> - allow multiple message files (which can be processed to produce .h
> files). eg. pg_dump would have it's own pg_dump_messages.xxx file.

I guess I fail to see why that's better than processing the .c files
to extract the message strings from them.

I agree that the sort of system Peter proposes doesn't have any direct
forcing function to discourage gratuitous variations of what's basically
the same message.  The forcing function would have to come from the
translators, who will look at the extracted list of messages and
complain that there are near-duplicates.  Then we fix the
near-duplicates.  Seems like no big deal.

However, a system that uses multiple message files is also not going to
discourage near-duplicates very effectively.  I don't think you can have
it both ways: if you are discouraging near-duplicates, then you are
making it harder to for people to create new messages, whether
duplicates or not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: More on elog and error codes
Next
From: Roberto Mello
Date:
Subject: Re: Call for platforms (linux 2.4.x ?)