79345943

Date: 2025-01-10 14:01:05
Score: 2
Natty:
Report link

Thanks @mklement0 for the great links. That was a set of good reads to refamiliarize myself with.

It turned out in my case that I needed to surround the password with " characters.

I failed to mention that I am calling az postgres flexible-server execute in a PS1 script that is itself called from another PS1 script, all running in pwsh.

Ultimately what worked was, basically:

# $rawPW is the raw password from a KV Secret or elsewhere
$p = """" + $rawPW + """"
...
az postgres flexible-server execute -n the-instance-name -u theName -p $p -d theDatabase -q "select * from MyTable"
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @mklement0
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Howard Hoffman