For Postgresql:
psql --version
Someone else will have to answer for AOLServer and OACS. I have no clue (though OACS does tell you the package versions in the Install Software page).