aws / pg_tle

Framework for building trusted language extensions for PostgreSQL
Apache License 2.0
337 stars 31 forks source link

Allow superuser to ALTER OWNER of datatype functions #251

Closed adamguo0 closed 1 year ago

adamguo0 commented 1 year ago

Issue #, if available: https://github.com/aws/pg_tle/issues/249

Description of changes: Allow superuser to ALTER OWNER of datatype functions. Needed to unblock pg_dump/pg_restore of custom datatypes. pg_restore won't succeed for non-superuser roles regardless since create extension pg_tle requires superuser.

A fix for 002_pg_tle_dump_restore.pl is included. With the updated test, the original code fails as expected.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.