Warning
The product is in closed beta and not open to the public.
pq¶
vb pq SUBCOMMAND [OPTIONS]
Description¶
Run PostgreSQL debug/admin subcommands.
PostgreSQL is initialized by vb pq init. It accepts connection and
password options, or prompts for any values that are omitted. It creates
the VisionByte database and a restricted runtime role, then stores the
runtime connection in the local global configuration database.
Subcommands¶
vb pq init¶
vb pq init [OPTIONS]
Description¶
Initialize the VisionByte PostgreSQL database and runtime role. This command is also used to reapply the current VisionByte schema. Administrator credentials are used only for this invocation and are never stored. The supplied runtime password is stored locally.
Options¶
- --host HOST¶
PostgreSQL host (default: localhost)
- --port PORT¶
PostgreSQL port (default: 5432)
- --database NAME¶
VisionByte database (default: VisionByte)
- --admin-user USER¶
PostgreSQL administrator (default: postgres)
- --admin-password PASSWORD¶
PostgreSQL administrator password
- --runtime-user USER¶
Runtime role (default: vb_runtime)
- --runtime-password PASSWORD¶
Password for the runtime role
Values not supplied by an option are prompted for. Password options can be visible in shell history and process listings; prefer prompts for interactive use.
vb pq test¶
vb pq test
Description¶
Show the stored runtime connection values and test whether the database connection can be opened successfully.
The password value is never printed directly.
vb pq exec¶
vb pq exec SQL ...
Description¶
Execute SQL using the configured PostgreSQL connection.
If the SQL statement returns rows, all rows and columns are printed
using aligned text output. If the SQL statement does not return
rows, print OK on success.
Examples:
vb pq exec SELECT 1
vb pq exec SELECT current_user
vb pq lock¶
vb pq lock KEY
Description¶
Acquire a PostgreSQL advisory lock for KEY and keep it until this command exits. Stop the command to release the lock.