Viewing rules

You want to see what rules you have defined for a particular view/table.

Solution

Use the pg_rules system table.

SELECT * FROM pg_rules WHERE tablename='foo';