decode is oracle's proprietery version of a 'case when' statement. This must have been missed in our porting efforts. You can fix this by changing the decode statement to:
case when last_modified = posted then 'f'::char else 't'::char end as ever_edited_p