pgtle.set_default_version - Amazon Relational Database Service
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.set_default_version

The set_default_version function lets you specify a default_version for your TLE extension. You can use this function to define an upgrade path and designate the version as the default for your TLE extension. When database users specify your TLE extension in the CREATE EXTENSION and ALTER EXTENSION ... UPDATE commands, that version of your TLE extension is created in the database for that user.

This function returns true on success. If the TLE extension specified in the name argument doesn't exist, the function returns an error. Similarly, if the version of the TLE extension doesn't exist, it returns an error.

Function prototype

pgtle.set_default_version(name text, version text)

Role

pgtle_admin

Arguments

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

  • version – The version of the TLE extension to set the default.

Output

  • true – When setting default version succeeds, the function returns true.

  • ERROR – Returns an error message if a TLE extension with the specified name or version doesn't exist.

Usage example

SELECT * FROM pgtle.set_default_version('my-extension', '1.1');