NAMESPACE CURRENT
Returns the active namespace for the current session.
Syntax
Section titled “Syntax”NAMESPACE CURRENTParameters
Section titled “Parameters”None.
Return Value
Section titled “Return Value”Bulk string: the dot-separated namespace path currently active in the session.
Behavior
Section titled “Behavior”Every new session starts with the default namespace configured via default_namespace in the cluster configuration. The
active namespace can be changed with NAMESPACE USE.
NAMESPACE CURRENT reads the active namespace from the session attributes and returns it as a bulk string.
Errors
Section titled “Errors”| Error Code | Description |
|---|---|
ERR | The current namespace is null, empty, or blank. This should not occur under normal operation since sessions are initialized with the default namespace. |
Examples
Section titled “Examples”Return the default namespace:
> NAMESPACE CURRENTglobalReturn the namespace after switching:
> NAMESPACE USE production.usersOK
> NAMESPACE CURRENTproduction.users