Method IsInsufficientPrivilege(Exception)
The connected role is not allowed to do what the statement does: PostgreSQL 42501
(insufficient_privilege), SQL Server 229 (permission denied on object), 262 (permission
denied for CREATE/ALTER), 297 (user does not have permission), 3701 ("cannot drop ... because
it does not exist or you do not have permission" — the module redeploy drops functions it has
just read the version from, so in that context the second reading is the only one possible),
15247 (permission denied on server). This is what an application without owner rights gets
when it tries to apply a schema upgrade — and what turns into
instead of a raw driver error.
public static bool IsInsufficientPrivilege(Exception ex)