pgtle.register_feature_if_not_exists
The pgtle.register_feature_if_not_exists
function adds the specified PostgreSQL feature
to the pgtle.feature_info
table and identifies the TLE extension or other procedure or function
that uses the feature. For more information about hooks and Trusted Language Extensions, see
Using PostgreSQL hooks with your TLE extensions.
Function prototype
pgtle.register_feature_if_not_exists(proc regproc, feature pg_tle_feature)
Role
pgtle_admin
Arguments
proc
– The name of a stored procedure or function that contains the logic (code) to use as a feature for your TLE extension. For example, thepw_hook
code.feature
– The name of the PostgreSQL feature to register for the TLE function. Currently, the only available feature is thepasscheck
hook. For more information, see Password-check hook (passcheck).
Output
Returns true
after registering the feature for the specified
extension. Returns false
if the feature is already registered.
Usage example
SELECT pgtle.register_feature_if_not_exists('pw_hook', 'passcheck');