ddl dml fix for postgresql