pgsql: Improve error messages in parse_jsonb_index_flags().
pgsql: Improve error messages in parse_jsonb_index_flags().
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Improve error messages in parse_jsonb_index_flags(). Some of the error messages in this function weren't very well thought out. They mistook reachable cases for unreachable ones, and complained in words that were actually exactly backward from the condition they'd detected, and weren't helpful anyway. Since this is just substituting better error text and a better SQLSTATE for what was there before, I don't feel a strong need to back-patch. Bug: #19910 Reported-by: Zheng Hacker Author: Tom Lane Discussion: https://postgr.es/m/19910-24199f8af1474753@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9b937d1d1d0c54e24280967ba1dd11aff66d1486 Modified Files -------------- src/backend/utils/adt/jsonfuncs.c | 13 +++++++++---- src/test/regress/expected/json.out | 3 ++- src/test/regress/expected/jsonb.out | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-)