I noticed the following bug when testing an application (openbravo 2.40) on postgresql 8.4:
Environment:
8.4beta
Package from: https://launchpad.net/~pitti/+archive/postgresql
recompiled for ubuntu intrepid
The following query does trigger the FailedAssertion:
SELECT ad_field.name As Name, ad_field_trl.name as columnname
FROM ad_field left join ad_field_trl on ad_field.ad_field_id = ad_field_trl.ad_field_id
and ad_field_trl.ad_language = 'en_US',
ad_column
WHERE ad_field.ad_column_id = ad_column.ad_column_id
and ad_tab_id = to_number(1) and isParent='Y'
and exists(select 1 from ad_column c, ad_field f where c.ad_column_id = f.ad_column_id and c.iskey='Y'
and ad_tab_id=to_number(1) and UPPER(c.columnname) = UPPER(ad_column.columnname));
The minimum needed table-structure and function definition (to_number) are attached.
The original usecase did have to_number(?) via jdbc-preparedstatement and passing the parameter via setString, thus
usingthe to_number(text) function. But the same assertion does also happen with the query shown above..
Feel free to ask for any more needed information.
Regards,
Stefan