common for sql and postgresl