pgtle.uninstall_extension_if_exists - Amazon Aurora
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

pgtle.uninstall_extension_if_exists

The uninstall_extension_if_exists function removes all versions of a TLE extension from a given database. If the TLE extension doesn't exist, the function returns silently (no error message is raised). If the specified extension is currently active within a database, this function doesn't drop it. You must explicitly call DROP EXTENSION to remove the TLE extension before using this function to uninstall its artifacts.

Function prototype

pgtle.uninstall_extension_if_exists(extname text)

Role

pgtle_admin

Arguments

  • extname – The name of the TLE extension. This value is used when calling CREATE EXTENSION.

Output

The uninstall_extension_if_exists function returns true after uninstalling the specified extension. If the specified extension doesn't exist, the function returns false.

  • true – Returns true after uninstalling the TLE extension.

  • false – Returns false when the TLE extension doesn't exist in the database.

Usage example

SELECT * FROM pgtle.uninstall_extension_if_exists('pg_tle_test');