added TOI view for postgres