postgresql/src/backend
Tom Lane ea42ccbced Validate the OID argument of pg_import_system_collations().
"SELECT pg_import_system_collations(0)" caused an assertion failure.
With a random nonzero argument --- or indeed with zero, in non-assert
builds --- it would happily make pg_collation entries with garbage
values of collnamespace.  These are harmless as far as I can tell
(unless maybe the OID happens to become used for a schema, later on?).
In any case this isn't a security issue, since the function is
superuser-only.  But it seems like a gotcha for unwary DBAs, so let's
add a check that the given OID belongs to some schema.

Back-patch to v10 where this function was introduced.
2021-03-08 18:21:51 -05:00
..
access Reinstate HEAP_XMAX_LOCK_ONLY|HEAP_KEYS_UPDATED as allowed 2021-02-23 17:30:21 -03:00
bootstrap Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
catalog Disallow converting an inheritance child table to a view. 2021-02-06 15:17:02 -05:00
commands Validate the OID argument of pg_import_system_collations(). 2021-03-08 18:21:51 -05:00
executor Make ExecGetInsertedCols() and friends more robust and improve comments. 2021-02-15 09:29:49 +02:00
foreign Remove bogus "extern" annotations on function definitions. 2018-02-19 12:07:44 -05:00
jit jit: Correct parameter type for generated expression evaluation functions. 2020-12-07 18:40:27 -08:00
lib Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
libpq Fix unportable use of getnameinfo() in pg_hba_file_rules view. 2020-11-02 21:11:50 -05:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Ensure that expandTableLikeClause() re-examines the same table. 2020-12-01 14:02:28 -05:00
optimizer Silence another gcc 11 warning. 2021-01-28 17:18:38 -05:00
parser Ensure that expandTableLikeClause() re-examines the same table. 2020-12-01 14:02:28 -05:00
partitioning Fix hash partition pruning with asymmetric partition sets. 2021-01-28 13:41:55 -05:00
po Translation updates 2021-02-08 18:00:20 +01:00
port Fix race condition in our Windows signal emulation. 2019-12-09 15:03:51 -05:00
postmaster Fix race condition between shutdown and unstarted background workers. 2020-12-24 17:00:43 -05:00
regex Fix another ancient bug in parsing of BRE-mode regular expressions. 2021-02-18 22:38:55 -05:00
replication Fix memory leak in SnapBuildSerialize. 2021-01-13 08:50:13 +05:30
rewrite Revert "Propagate CTE property flags when copying a CTE list into a rule." 2021-02-07 12:54:08 -05:00
snowball Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
statistics Make error logging in extended statistics more consistent 2019-05-30 17:06:21 +02:00
storage Hold interrupts while running dsm_detach() callbacks. 2021-02-15 14:21:01 +13:00
tcop Avoid crash when rolling back within a prepared statement. 2021-02-03 19:38:29 -05:00
tsearch Avoid possible dangling-pointer access in tsearch_readline_callback. 2020-09-23 11:36:13 -04:00
utils Default to wal_sync_method=fdatasync on FreeBSD. 2021-02-15 16:06:25 +13:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
nls.mk Translation updates 2018-09-17 08:40:36 +02:00