Hi anonymous userLer-8938, welcome to Microsoft Q&A forum.
The link that you have provided corresponds to Azure SQL Database, but I think what you are looking for is Azure Database for PostgreSQL as per your query. You can use the below article to create a dump file on your local system by connecting to Azure Postgres.
Migrate your PostgreSQL database by using dump and restore
I also tried using the below command and was able to create dump of database:
pg_dump -Fc -v --host=<yourpostgresserver>.postgres.database.azure.com --username=username@xxxxxx --dbname=<yourdatabasename> -f backup.dump
I am assuming you already have PostgreSQL installed on system.
You also need to add a firewall to connection security from the machine you are running this command from.
Please let me know if this helps or you need more information.
----------
if answer helps, you can mark it 'Accept Answer'