Improve reporting of run-time-detected indeterminate-collation errors.
Tom Lane <tgl@sss.pgh.pa.us>
Improve reporting of run-time-detected indeterminate-collation errors. pg_newlocale_from_collation does not have enough context to give an error message that's even a little bit useful, so move the responsibility for complaining up to its callers. Also, reword ERRCODE_INDETERMINATE_COLLATION error messages in a less jargony, more message-style-guide-compliant fashion.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/collationcmds.c | modified | +1 −1 |
| src/backend/commands/indexcmds.c | modified | +1 −1 |
| src/backend/commands/view.c | modified | +1 −1 |
| src/backend/utils/adt/formatting.c | modified | +78 −0 |
| src/backend/utils/adt/pg_locale.c | modified | +3 −11 |
| src/backend/utils/adt/varlena.c | modified | +13 −0 |
| src/test/regress/expected/collate.linux.utf8.out | modified | +4 −2 |
| src/test/regress/expected/collate.out | modified | +4 −2 |