PostgreSQL 11.5 closes a temporary type privilege escalation
engineeringpostgresqlsecuritytypesA temporary type could capture an inexact function call inside a privileged function. PostgreSQL 11.5 tightens functional cast resolution and fixes several other security issues.