ENABLED
Re-enable an endpoint that an earlier @disabled would otherwise hide.
Rarely needed
Endpoints are enabled by default. You only need @enabled to undo a @disabled on a tag-conditional basis. If you've never reached for @disabled, you don't need @enabled either.
Keywords
@enabled, enabled
Syntax
code
@enabled
@enabled <tag1>, <tag2>, ...- Without tags: enables the endpoint unconditionally.
- With tags: enables only when the routine matches at least one of the listed tags.
The available auto-tags assigned by RoutineSource are function, procedure, volatile, stable, immutable, other. SQL file endpoints have no auto-tags.
Example: disable-by-default, enable for immutable only
sql
sql
comment on function calculate_total(_items json) is '
HTTP GET
@disabled
@enabled immutable
@cached';The endpoint is disabled by default, but re-enabled when the function is declared IMMUTABLE. If you later mark the function STABLE or VOLATILE, the endpoint disappears without further changes.