Postgresql Create New Table From Select Query C