When using OpenERP 4.2.2. with PostgreSQL 8.3, a few SQL errors appear when installing new modules, with SUBSTRING appearing with dates.
A solution is suggested here (by cornflake on the OpenERP forum). Basically, it consists in replacing all occurences of "substring(date for 7)" by "to_char(date, 'YYYY-MM')" in /usr/share/tinyerp-server/addons/