Postgres Table And Columns Query String In Python