postgresql/src/include/executor
Amit Langote 716bd12d22 SQL/JSON: Always coerce JsonExpr result at runtime
Instead of looking up casts at parse time for converting the result
of JsonPath* query functions to the specified or the default
RETURNING type, always perform the conversion at runtime using either
the target type's input function or the function
json_populate_type().

There are two motivations for this change:

1. json_populate_type() coerces to types with typmod such that any
   string values that exceed length limit cause an error instead of
   silent truncation, which is necessary to be standard-conforming.

2. It was possible to end up with a cast expression that doesn't
   support soft handling of errors causing bugs in the of handling
   ON ERROR clause.

JsonExpr.coercion_expr which would store the cast expression is no
longer necessary, so remove.

Bump catversion because stored rules change because of the above
removal.

Reported-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Jian He <jian.universality@gmail.com>
Discussion: Discussion: https://postgr.es/m/202405271326.5a5rprki64aw%40alvherre.pgsql
2024-06-28 21:58:13 +09:00
..
execAsync.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
execdebug.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
execdesc.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
execExpr.h SQL/JSON: Always coerce JsonExpr result at runtime 2024-06-28 21:58:13 +09:00
execParallel.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
execPartition.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
executor.h Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
functions.h Fix confusion about the return rowtype of SQL-language procedures. 2024-03-12 18:16:25 -04:00
hashjoin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
instrument.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeAgg.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeAppend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeBitmapAnd.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeBitmapHeapscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeBitmapIndexscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeBitmapOr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeCtescan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeCustom.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeForeignscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeFunctionscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeGather.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeGatherMerge.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeGroup.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeHash.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeHashjoin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeIncrementalSort.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeIndexonlyscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeIndexscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeLimit.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeLockRows.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeMaterial.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeMemoize.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeMergeAppend.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeMergejoin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeModifyTable.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeNamedtuplestorescan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeNestloop.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeProjectSet.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeRecursiveunion.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeResult.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSamplescan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSeqscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSetOp.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSort.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSubplan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeSubqueryscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeTableFuncscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeTidrangescan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeTidscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeUnique.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeValuesscan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeWindowAgg.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
nodeWorktablescan.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
spi.h Add RETURNING support to MERGE. 2024-03-17 13:58:59 +00:00
spi_priv.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
tablefunc.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
tqueue.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
tstoreReceiver.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
tuptable.h Add TupleTableSlotOps.is_current_xact_tuple() method 2024-03-21 23:00:43 +02:00