Skip to main content

mdbversion()

Returns the current Metadb version string.

Signature

Return Type
text
The version string in semantic versioning format (e.g., “1.2.0”)

Usage

select mdbversion();

Example Output

 mdbversion 
------------
 1.2.0
(1 row)

Use Cases

Verify which version of Metadb is running before executing version-specific commands:
select mdbversion();
Include version information in monitoring dashboards or automated reports:
select 
  mdbversion() as version,
  current_timestamp as checked_at;

mdbusers()

Returns a list of all users registered with the Metadb instance.

Signature

Return Type
table
Returns a table with the following columns:
username
text
The username of each registered user

Usage

select * from mdbusers();

Example Output

  username  
------------
 admin
 analyst
 readonly_user
(3 rows)

Use Cases

List all registered users to verify access:
select * from mdbusers()
order by username;
Check which users are registered before granting or revoking privileges:
-- Verify user exists before granting access
select username from mdbusers() where username = 'newuser';
The mdbusers() function only returns users that have been registered with the Metadb instance via create user or register user commands. Database users that exist in PostgreSQL but are not registered will not appear.

User Management

Create and register database users

Monitoring Functions

Monitor logs and running processes

Build docs developers (and LLMs) love