postgresql/src/backend/commands
Tomas Vondra 267ccc38ba Check syscache result in AlterStatistics
The syscache lookup may return NULL even for valid OID, for example due
to a concurrent DROP STATISTICS, so a HeapTupleIsValid is necessary.
Without it, it may fail with a segfault.

Reported by Alexander Lakhin, patch by me. Backpatch to 13, where ALTER
STATISTICS ... SET STATISTICS was introduced.

Backpatch-through: 13
Discussion: https://postgr.es/m/17372-bf3b6e947e35ae77%40postgresql.org
2022-01-23 03:20:32 +01:00
..
aggregatecmds.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
alter.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
amcmds.c Add missing invocations to object access hooks 2020-05-23 14:03:04 +09:00
analyze.c Build inherited extended stats on partitioned tables 2022-01-15 19:14:00 +01:00
async.c Send NOTIFY signals during CommitTransaction. 2021-09-14 17:18:25 -04:00
cluster.c Fix toast rewrites in logical decoding. 2021-08-25 09:23:27 +05:30
collationcmds.c Disallow creating an ICU collation if the DB encoding won't support it. 2021-09-03 16:38:55 -04:00
comment.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
constraint.c Fix bogus CALLED_AS_TRIGGER() defenses. 2020-04-03 11:24:56 -04:00
conversioncmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
copy.c Fix permission checks on constraint violation errors on partitions. 2021-02-08 11:01:55 +02:00
createas.c Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
dbcommands.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
define.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
discard.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dropcmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
event_trigger.c Fix use-after-free bug with event triggers in an extension script 2020-09-15 21:03:14 -03:00
explain.c Fix index-only scan plans, take 2. 2022-01-03 15:42:27 -05:00
extension.c Lock the extension during ALTER EXTENSION ADD/DROP. 2021-07-11 12:54:24 -04:00
foreigncmds.c Add missing invocations to object access hooks 2020-05-23 14:03:04 +09:00
functioncmds.c Fix misevaluation of STABLE parameters in CALL within plpgsql. 2021-09-21 19:06:33 -04:00
indexcmds.c Remove StoreSingleInheritance reimplementation 2021-03-25 10:47:38 -03:00
lockcmds.c Revert "Accept relations of any kind in LOCK TABLE". 2020-11-06 16:17:56 -05:00
Makefile Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
matview.c Error out if SKIP LOCKED and WITH TIES are both specified 2021-10-01 18:29:18 -03:00
opclasscmds.c Message fixes and style improvements 2020-09-14 06:42:07 +02:00
operatorcmds.c Prevent ALTER TYPE/DOMAIN/OPERATOR from changing extension membership. 2021-08-17 14:29:22 -04:00
policy.c Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). 2021-06-25 13:59:38 -04:00
portalcmds.c Fix some anomalies with NO SCROLL cursors. 2021-09-10 13:18:32 -04:00
prepare.c Fix plancache refcount leak after error in ExecuteQuery. 2021-06-16 19:30:17 -04:00
proclang.c Remove the "opaque" pseudo-type and associated compatibility hacks. 2020-03-05 15:48:56 -05:00
publicationcmds.c Invalidate all partitions for a partitioned table in publication. 2021-09-22 08:24:20 +05:30
schemacmds.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
seclabel.c Check criticalSharedRelcachesBuilt in GetSharedSecurityLabel(). 2021-10-14 12:24:47 -07:00
sequence.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statscmds.c Check syscache result in AlterStatistics 2022-01-23 03:20:32 +01:00
subscriptioncmds.c Don't allow to set replication slot_name as ''. 2021-07-19 11:04:21 +05:30
tablecmds.c Prevent altering partitioned table's rowtype, if it's used elsewhere. 2022-01-06 16:46:46 -05:00
tablespace.c Fix data loss in wal_level=minimal crash recovery of CREATE TABLESPACE. 2021-08-27 23:33:27 -07:00
trigger.c Preserve firing-on state when cloning row triggers to partitions 2021-07-16 13:01:43 -04:00
tsearchcmds.c Preserve integer and float values accurately in (de)serialize_deflist. 2020-03-10 12:30:02 -04:00
typecmds.c Prevent ALTER TYPE/DOMAIN/OPERATOR from changing extension membership. 2021-08-17 14:29:22 -04:00
user.c Allow users with BYPASSRLS to alter their own passwords. 2020-11-03 15:41:32 -05:00
vacuum.c Improve docs and error messages for parallel vacuum. 2021-05-25 09:40:16 +05:30
variable.c Fix some inappropriately-disallowed uses of ALTER ROLE/DATABASE SET. 2021-04-13 15:10:18 -04:00
view.c Restructure ALTER TABLE execution to fix assorted bugs. 2020-01-15 18:49:24 -05:00