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 callingCREATE EXTENSION
.version
– The version of the TLE extension to set the default.
Output
true
– When setting default version succeeds, the function returnstrue
.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);