It would be faster to just have live_revision and latest_revision in the view rather than something which would
turn into:
where
decode(live_revision = revision_id,1,'t','f') = 't'
or something like that as it would be a where clause with a function which, as well all know, sucks bigtime.