Migrate SELECT query from oracle to postgresql
This: 

AND   EXTRACT(month from age(NOW(),td_inf.date_chgt_etat)) &gt; 2 


is something different then the original Oracle condition. 

The extract functions does not get the equivalent of the interval in months, but simply the "month" field. So if the interval is "1 year  0 months 2 days 16 hours", extract(month from ...) will return 0.

What you want is: 

and age(now(), td_inf.date_chgt_etat) &gt; interval '2 months'


or if you want to make that use an index on the column: 

and td_inf.date_chgt_etat &lt; now() - interval '2 months'




Your query is also missing the

AND   ch.cod_ent in (...) 


You have translated that to a JOIN which does something different. Whether or not that changes the result depends on how the two tables com_ent_ft and com_habilitation are related.