diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-03-08 18:21:51 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-03-08 18:21:51 -0500 |
commit | 5c06abb9b97b69513a3998cccf89556e73052e02 (patch) | |
tree | 49a1031d3208c9c9d346655602905fb445f9d9f4 /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | 6c20bdb2a279086777a3595ab00bcf14671fc5a1 (diff) | |
download | postgresql-5c06abb9b97b69513a3998cccf89556e73052e02.tar.gz postgresql-5c06abb9b97b69513a3998cccf89556e73052e02.zip |
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.
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
0 files changed, 0 insertions, 0 deletions