db
db test
Test database connection
Test the connectivity of a database connection by sending a health check through PgBeam to the upstream PostgreSQL server. Validates that the host is reachable, credentials are correct, and SSL is properly configured. Reports the round-trip latency on success.
Usage
pgbeam db test <id>Options
| Option | Description | Required | Default |
|---|---|---|---|
<id> | ID of the database connection to test | Yes | - |
Global options
All global options (--token, --profile,
--project, --org, --json, --no-color, --debug) are also available on
this command.
Examples
# Test a database connection
pgbeam db test db_xxx
# Test and get result as JSON
pgbeam db test db_xxx --jsonOutput
On success, prints the connection latency in milliseconds. On failure, prints
the error message and exits with a non-zero code. With --json, returns an
object with ok, latency_ms, and error fields.