postgresql/src/bin/pg_dump
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
..
po Translation updates 2020-05-18 12:49:30 +02:00
t Extended statistics on expressions 2021-03-27 00:01:11 +01:00
.gitignore Clean up after pg_dump test runs. 2016-05-06 22:28:01 -04:00
common.c pg_dump: Fix dumping of inherited generated columns 2021-02-03 11:27:13 +01:00
compress_io.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
compress_io.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
dumputils.c Fix pg_dump for GRANT OPTION among initial privileges. 2021-01-16 12:21:35 -08:00
dumputils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Update copyright for 2021 2021-01-02 13:06:25 -05:00
nls.mk Fix gettext triggers specification 2019-08-26 19:06:01 +02:00
parallel.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
parallel.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_backup.h Fix up pg_dump's handling of per-attribute compression options. 2021-03-20 15:01:10 -04:00
pg_backup_archiver.c Fix pg_restore's misdesigned code for detecting archive file format. 2021-04-01 13:34:16 -04:00
pg_backup_archiver.h Fix pg_restore's misdesigned code for detecting archive file format. 2021-04-01 13:34:16 -04:00
pg_backup_custom.c Yet more elimination of dead stores and useless initializations. 2020-09-05 13:17:32 -04:00
pg_backup_db.c Avoid redundantly prefixing PQerrorMessage for a connection failure. 2021-01-22 16:52:31 -05:00
pg_backup_db.h Revert "pg_dump: Lock all relations, not just plain tables". 2020-11-06 15:48:04 -05:00
pg_backup_directory.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_backup_null.c Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
pg_backup_tar.c Fix pg_restore's misdesigned code for detecting archive file format. 2021-04-01 13:34:16 -04:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_backup_utils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_dump.c Undo decision to allow pg_proc.prosrc to be NULL. 2021-04-15 17:17:20 -04:00
pg_dump.h Fix up pg_dump's handling of per-attribute compression options. 2021-03-20 15:01:10 -04:00
pg_dump_sort.c Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry. 2021-01-11 21:09:18 -05:00
pg_dumpall.c Avoid redundantly prefixing PQerrorMessage for a connection failure. 2021-01-22 16:52:31 -05:00
pg_restore.c Fix handling of -d "connection string" in pg_dump/pg_restore. 2020-09-24 18:19:38 -04:00