Azure / azure-postgresql

Azure Database for PostgreSQL (fully managed service for PostgreSQL in Azure)
MIT License
77 stars 78 forks source link

Incorrectly escaped characters in Azure Cloud Shell when connecting to PostgreSQL database #113

Open SeaDude opened 8 months ago

SeaDude commented 8 months ago

Hello,

I deployed a new Azure Database for PostgreSQL server and database. When I try to connect to the database using the Connect button in the Databases blade, the default bash command that Azure Cloud Shell tries fails every time.

Default: bold chars below need to be removed from the command.

psql "host=<your-server-name>.postgres.database.azure.com port=5432 dbname=<your-database-name> user=<your-admin-name>@<your-domain.com> password=\'\$\(az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken\)\' sslmode=require"

Should be:

psql "host=<your-server-name>.postgres.database.azure.com port=5432 dbname=<your-database-name> user=<your-admin-name>@<your-domain.com> password=$(az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken) sslmode=require"
SeaDude commented 8 months ago

Bump