postgresql/src/include/executor
Tom Lane 1111b2668d Undo decision to allow pg_proc.prosrc to be NULL.
Commit e717a9a18 changed the longstanding rule that prosrc is NOT NULL
because when a SQL-language function is written in SQL-standard style,
we don't currently have anything useful to put there.  This seems a poor
decision though, as it could easily have negative impacts on external
PLs (opening them to crashes they didn't use to have, for instance).
SQL-function-related code can just as easily test "is prosqlbody not
null" as "is prosrc null", so there's no real gain there either.
Hence, revert the NOT NULL marking removal and adjust related logic.

For now, we just put an empty string into prosrc for SQL-standard
functions.  Maybe we'll have a better idea later, although the
history of things like pg_attrdef.adsrc suggests that it's not
easy to maintain a string equivalent of a node tree.

This also adds an assertion that queryDesc->sourceText != NULL
to standard_ExecutorStart.  We'd been silently relying on that
for awhile, so let's make it less silent.

Also fix some overlooked documentation and test cases.

Discussion: https://postgr.es/m/2197698.1617984583@sss.pgh.pa.us
2021-04-15 17:17:20 -04:00
..
execAsync.h Add support for asynchronous execution. 2021-03-31 18:45:00 +09:00
execdebug.h
execdesc.h
execExpr.h Redesign the caching done by get_cached_rowtype(). 2021-04-13 13:37:07 -04:00
execParallel.h
execPartition.h Postpone some stuff out of ExecInitModifyTable. 2021-04-06 15:57:11 -04:00
executor.h Postpone some stuff out of ExecInitModifyTable. 2021-04-06 15:57:11 -04:00
functions.h Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
hashjoin.h Revert "Fix race in Parallel Hash Join batch cleanup." 2021-03-18 01:10:55 +13:00
instrument.h
nodeAgg.h
nodeAppend.h Add support for asynchronous execution. 2021-03-31 18:45:00 +09:00
nodeBitmapAnd.h
nodeBitmapHeapscan.h
nodeBitmapIndexscan.h
nodeBitmapOr.h
nodeCtescan.h
nodeCustom.h
nodeForeignscan.h Add support for asynchronous execution. 2021-03-31 18:45:00 +09:00
nodeFunctionscan.h
nodeGather.h
nodeGatherMerge.h
nodeGroup.h
nodeHash.h
nodeHashjoin.h
nodeIncrementalSort.h
nodeIndexonlyscan.h
nodeIndexscan.h
nodeLimit.h
nodeLockRows.h
nodeMaterial.h
nodeMergeAppend.h
nodeMergejoin.h
nodeModifyTable.h
nodeNamedtuplestorescan.h
nodeNestloop.h
nodeProjectSet.h
nodeRecursiveunion.h
nodeResult.h
nodeResultCache.h Fix missing #include in nodeResultCache.h. 2021-04-06 11:23:56 -04:00
nodeSamplescan.h
nodeSeqscan.h
nodeSetOp.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodeSort.h
nodeSubplan.h
nodeSubqueryscan.h
nodeTableFuncscan.h
nodeTidrangescan.h
nodeTidscan.h
nodeUnique.h
nodeValuesscan.h
nodeWindowAgg.h
nodeWorktablescan.h
spi_priv.h
spi.h
tablefunc.h
tqueue.h
tstoreReceiver.h
tuptable.h