Postgres Get Length Of String Python Methods