postgresql/src
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
..
backend Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
bin Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
common Refactor HMAC implementations 2021-04-03 17:30:49 +09:00
fe_utils Allow psql's \df and \do commands to specify argument types. 2021-04-07 23:02:21 -04:00
include Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
interfaces Suppress length of Notice/Error msgs in PQtrace regress mode 2021-04-09 17:13:18 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Redesign the caching done by get_cached_rowtype(). 2021-04-13 13:37:07 -04:00
port Move bsearch_arg to src/port 2021-03-23 00:11:22 +01:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 39 2021-04-08 08:28:03 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00