Postgres Get Length Of String In Python