Postgres Aggregate Functions For Strings Python