pg sql fixes for todo and locale editmode