Postgresql conversion and view updates