Only allow returning string types or bytea from json_serialize
Andrew Dunstan <andrew@dunslane.net>
Only allow returning string types or bytea from json_serialize These are documented to be the allowed types for the RETURNING clause, but the restriction was not being enforced, which caused a segfault if another type was specified. Add some testing for this. Per report from a.kozhemyakin Backpatch to release 15.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_expr.c | modified | +17 −0 |
| src/test/regress/expected/sqljson.out | modified | +10 −0 |
| src/test/regress/sql/sqljson.sql | modified | +5 −0 |