Hi Vasek Polak •,
Welcome to Microsoft Q&A forum and thanks for using Azure Services.
As I understand, you want to get database size of all databases in Azure Flexible Server.
You may use pg_database_size() mentioned here: https://pgpedia.info/p/pg_database_size.html
or pg_total_relation_size() which is a function for determining the total size of a relation. https://pgpedia.info/p/pg_total_relation_size.html
Also refer to https://stackoverflow.com/questions/41991380/whats-the-difference-between-pg-table-size-pg-relation-size-pg-total-relatio Stackoverflow thread which might help.
Please let us know if you have further queries.
Thanks