I found simple code for PHP to convert roman numeral to decimal here:
https://stackoverflow.com/questions/6265596/how-to-convert-a-roman-numeral-to-integer-in-php
Can this be accomplished with a pgsql function?