You can use Azure Database for PostgreSQL as an output for data that's relational in nature or for applications that require content to be hosted in a relational database. Azure Stream Analytics jobs write to an existing table in a PostgreSQL database.
https://learn.microsoft.com/en-us/azure/stream-analytics/postgresql-database-output
However, you can leverage Azure Functions to handle this. With an Azure Function triggered by Stream Analytics, you can utilize Python to connect to your Cosmos DB with the PostgreSQL API and update your data accordingly.