(self, obj_str, obj_type)
Generate revoke defaults for one section
Generate revoke defaults for one section
Generate revoke defaults for one section
def gen_revoke_defs(self, obj_str, obj_type):
        "Generate revoke defaults for one section"

        # process only things that have default grants to public
        if obj_type not in ('FUNCTION', 'DATABASE', 'LANGUAGE', 'TYPE', 'DOMAIN'):
            return

        defrole = 'public'

        # if the sections contains grants to 'public', dont drop
        if self.sect_hasvar(defrole):
            return

        obj_str = obj_str.strip().replace('\n', '\n    ')
        print "REVOKE ALL ON %s\n  FROM %s CASCADE;" % (obj_str, defrole)
def gen_revoke_defs ( self , obj_str , obj_type ) : # process only things that have default grants to public if obj_type not in ( 'FUNCTION' , 'DATABASE' , 'LANGUAGE' , 'TYPE' , 'DOMAIN' ) : return defrole = 'public' # if the sections contains grants to 'public', dont drop if self . sect_hasvar ( defrole ) : return obj_str = obj_str . strip ( ) . replace ( '\n' , '\n    ' ) print "REVOKE ALL ON %s\n  FROM %s CASCADE;" % ( obj_str , defrole )