views and functions for postgres from Oracle Sanofi RC2