aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorAmit Langote <amitlan@postgresql.org>2024-06-28 21:37:14 +0900
committerAmit Langote <amitlan@postgresql.org>2024-06-28 21:48:44 +0900
commitc2d93c3802b205d135d1ae1d7ac167d74e08a274 (patch)
tree1ae99e52fd159f09b2bb8f35f794f89c42c9f8bb /src/backend/utils/adt/jsonfuncs.c
parent065583cf460f980a182498941ac52810f709a897 (diff)
downloadpostgresql-c2d93c3802b205d135d1ae1d7ac167d74e08a274.tar.gz
postgresql-c2d93c3802b205d135d1ae1d7ac167d74e08a274.zip
SQL/JSON: Fix coercion of constructor outputs to types with typmod
Ensure SQL/JSON constructor functions that allow specifying the target type using the RETURNING clause perform implicit cast to that type. This ensures that output values that exceed the specified length produce an error rather than being silently truncated. This behavior conforms to the SQL standard. Reported-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Jian He <jian.universality@gmail.com> Discussion: https://postgr.es/m/202405271326.5a5rprki64aw%40alvherre.pgsql
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions