modified postgree sql