Improve jsonb cast error message

Teodor Sigaev <teodor@sigaev.ru>

Commit: cb5d94295986298af666534970f9bb3715574646
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2018-05-09T10:23:16Z
Releases: 11.0
Improve jsonb cast error message

Initial variant of error message didn't follow style of another casting error
messages and wasn't informative. Per gripe from Robert Haas.

Reviewer: Tom Lane
Discussion: https://www.postgresql.org/message-id/flat/CA%2BTgmob08StTV9yu04D0idRFNMh%2BUoyKax5Otvrix7rEZC8rMw%40mail.gmail.com#CA+Tgmob08StTV9yu04D0idRFNMh+UoyKax5Otvrix7rEZC8rMw@mail.gmail.com

Files

PathChange+/−
src/backend/utils/adt/jsonb.c modified +47 −24
src/test/regress/expected/jsonb.out modified +4 −4

Discussion

Cited messages not in the archive: CA+Tgmob08StTV9yu04D0idRFNMh+UoyKax5Otvrix7rEZC8rMw@mail.gmail.com#CA+Tgmob08StTV9yu04D0idRFNMh+UoyKax5Otvrix7rEZC8rMw@mail.gmail.com