SQL Studio

PostgreSQL

Connect to a PostgreSQL (or PostgreSQL-compatible) database.

Usage

sql-studio postgres [OPTIONS] <URL>

Arguments

ArgumentDescriptionEnv Var
URLPostgreSQL connection URLURL

Options

OptionDescriptionDefaultEnv Var
-s, --schemaPostgreSQL schema to usepublicSCHEMA

Connection URL Format

postgresql://user:password@host:port/database

Examples

# Connect to a local PostgreSQL database
sql-studio postgres postgresql://postgres:[email protected]/sample

# Specify a schema
sql-studio postgres --schema myschema postgresql://user:pass@localhost/mydb

# Using environment variables
export URL="postgresql://user:pass@localhost/mydb"
sql-studio postgres "$URL"

On this page

No Headings