function ruleDef($table, $rule) { $q = <<<END SELECT definition FROM pg_rules \tWHERE schemaname = %s \t AND tablename = %s \t AND rulename = %s END; $r = $this->db->query(sprintf($q, $this->db->addQuotes($this->db->getCoreSchema()), $this->db->addQuotes($table), $this->db->addQuotes($rule))); $row = $this->db->fetchRow($r); if (!$row) { return null; } $d = $row[0]; return $d; }