]> git.ipfire.org Git - thirdparty/postgresql.git/commit
dblink: Avoid locking relation before privilege check.
authorNathan Bossart <nathan@postgresql.org>
Tue, 14 Oct 2025 17:20:48 +0000 (12:20 -0500)
committerNathan Bossart <nathan@postgresql.org>
Tue, 14 Oct 2025 17:20:48 +0000 (12:20 -0500)
commitc9b299f6df983ff3b196677a625393c31598d86f
treeb06207adb7fa76654d97ae4dd5616f77c21219ee
parent4a8fb58671d36b8f6cb4f5c582b8dc5fa4d26702
dblink: Avoid locking relation before privilege check.

The present coding of dblink's get_rel_from_relname() predates the
introduction of RangeVarGetRelidExtended(), which provides a way to
check permissions before locking the relation.  This commit adjusts
get_rel_from_relname() to use that function.

Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://postgr.es/m/aOgmi6avE6qMw_6t%40nathan
contrib/dblink/dblink.c