In SQL Server I convert binary to Base64 like this
SELECT HASHBYTES('MD5', 'Test') FOR XML PATH(''), TYPE
and have result "DLxmEfVUC9CAmjiNyVphWw==".
In PostgreSQL i have
SELECT encode(md5('Test')::bytea, 'base64')
and result is "MGNiYzY2MTFmNTU0MGJkMDgwOWEzODhkYzk1YTYxNWI=".
How can I get result like SQL Server?