forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit798e235
committed
Rationalize error messages within jsonfuncs.c.
I noticed that the functions in jsonfuncs.c sometimes printed errormessages that claimed I'd called some other function. Investigation showedthat this was from repurposing code into "worker" functions without takingmuch care as to whether it would mention the right SQL-level function if itthrew an error. Moreover, there was a weird mismash of messages thatcontained a fixed function name, messages that used %s for a function name,and messages that constructed a function name out of spare parts, like"json%s_populate_record" (which, quite aside from being ugly as sin, wasn'teven sufficient to cover all the cases). This would put an undue burden onour long-suffering translators. Standardize on inserting the SQL functionname with %s so as to reduce the number of translatable strings, and passfunction names around as needed to make sure we can report the right one.Fix up some gratuitous variations in wording, too.1 parent8d2d7ad commit798e235
File tree
3 files changed
+135
-96
lines changed- src
- backend/utils/adt
- test/regress/expected
3 files changed
+135
-96
lines changed0 commit comments
Comments
(0)