Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias Import alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Call NameLoad TupleLoad Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args defaults body Expr Str If Call NameLoad TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad body Return NameLoad Return TupleLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str NameLoad NameLoad If CompareIs NameLoad NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If BoolOpOr UnaryOpNot NameLoad Call AttributeLoad NameLoad attr Str body If CompareIn Str SubscriptLoad NameLoad Index Str body Assign NameStore Str If CompareIn Str SubscriptLoad NameLoad Index Str body Assign NameStore Str orelse Assign NameStore Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr IfExp BoolOpOr UnaryOpNot NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad IfExp NameLoad NameLoad Str IfExp NameLoad NameLoad Str NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad NameLoad Str Assign SubscriptStore NameLoad Index Str Dict Str NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad NameLoad If CompareNotEq Call AttributeLoad NameLoad attr Str Num Num body Expr Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad Str NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body If CompareIn Str SubscriptLoad NameLoad Index Str body Assign NameStore Str If CompareIn Str SubscriptLoad NameLoad Index Str body Assign NameStore Str orelse Assign NameStore Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad NameLoad If CompareNotEq Call AttributeLoad NameLoad attr Str Num Num body Expr Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Str Assign NameStore Call NameLoad Str NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str Str body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If UnaryOpNot NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If UnaryOpNot NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If UnaryOpNot NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str If CompareIs NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str Str Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Str If NameLoad body AugAssignAdd NameStore ListLoad Str NameLoad If NameLoad body AugAssignAdd NameStore ListLoad Str NameLoad If NameLoad body AugAssignAdd NameStore ListLoad Str Call NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad ListLoad Str Str Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareGt SubscriptLoad NameLoad Index Str Num body Return NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword Str body If UnaryOpNot NameLoad body Continue If UnaryOpNot NameLoad body Assign NameStore NameLoad Continue Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Assign NameStore Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str Str Str Str Str Str BoolOpAnd NameLoad Call AttributeLoad Str attr NameLoad NameLoad BoolOpAnd NameLoad Call AttributeLoad Str attr NameLoad BoolOpAnd NameLoad Call AttributeLoad Str attr NameLoad BoolOpAnd NameLoad Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore ListLoad NameLoad Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num Str AugAssignAdd NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad TupleLoad NameLoad NameLoad body Return NameLoad If BoolOpAnd NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareNotEq SubscriptLoad NameLoad Index Str Num body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Assign NameStore Str Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Str Assign NameStore Str If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad If NameLoad body Assign NameStore ListComp Call AttributeLoad Str attr NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad body Return NameLoad Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num SubscriptLoad Call AttributeLoad NameLoad attr Index Num If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareNotEq SubscriptLoad NameLoad Index Str Num body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body If CompareGtE NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Str orelse Assign NameStore Str If CompareGtE NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Str orelse Assign NameStore Str orelse Expr Call AttributeLoad NameLoad attr Str Return NameLoad Assign NameStore Lambda arguments args NameParam defaults IfExp NameLoad NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Call NameLoad Str Str Call NameLoad Str Call NameLoad Str attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad NameLoad Index NameLoad Str body Return NameLoad orelse If CompareEq SubscriptLoad NameLoad Index NameLoad Str body Return NameLoad orelse Return NameLoad decorator_list For NameStore NameLoad body Assign NameStore Dict For NameStore TupleLoad Str Str Str Str Str Str Str Str body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad For NameStore TupleLoad Str body TryExcept body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str If NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad Str attr NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body If CompareNotIn SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Continue Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad body If UnaryOpNot NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpAnd NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body If CompareIn NameLoad ListLoad Str Str body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore NameLoad If CompareEq NameLoad Str body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str If UnaryOpNot BoolOpOr BoolOpAnd CompareIsNot NameLoad NameLoad BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign NameStore NameLoad If BoolOpAnd Call NameLoad NameLoad CompareEq Call NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore NameLoad Assign NameStore TupleLoad Dict Str Str Str NameLoad Dict Str Str Str NameLoad Dict Str Str Str NameLoad Dict Str Str Str Str NameLoad NameLoad Dict Str Str Str NameLoad Dict Str Str Str NameLoad Dict Str Str Str Str Str Call NameLoad NameLoad Call NameLoad NameLoad CompareIs NameLoad NameLoad Dict Str Str Str Str Str Str BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad BoolOpOr NameLoad Call NameLoad NameLoad NameLoad NameLoad Str Dict Str Str Str Str Str Call NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str If NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body If BoolOpAnd CompareIn Str NameLoad CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body If BoolOpAnd CompareIn Str NameLoad CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareIn Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareLt NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListLoad NameLoad If NameLoad body Assign NameStore ListLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq Call AttributeLoad NameLoad attr Str Str Str CompareNotEq Call AttributeLoad NameLoad attr Str NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore ListLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad If Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Expr Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore UnaryOpNot Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore CompareNotIn NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body If UnaryOpNot NameLoad body Assign NameStore ListLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call AttributeLoad Str attr NameLoad attr orelse Assign NameStore ListLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Str attr NameLoad attr If NameLoad body Expr Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore NameLoad For NameStore NameLoad body If BoolOpAnd CompareIn NameLoad NameLoad CompareNotEq NameLoad NameLoad body Assign NameStore NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore TupleLoad TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str For TupleStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr keyword NameLoad keyword SubscriptLoad NameLoad Index Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad ListLoad Str AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Assign NameStore Call AttributeLoad Str attr ListLoad Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body Assign NameStore Dict For NameStore TupleLoad Str Str body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Assign NameStore Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Str attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Str attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Str Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Str Str attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListLoad Str Str Str Str Str attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad TryExcept body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad Str body Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Str If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad If UnaryOpNot Call AttributeLoad Call NameLoad NameLoad attr Call NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad orelse If NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs NameLoad NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore NameLoad For NameStore NameLoad body If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body If CompareNotEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If CompareNotEq NameLoad Str body Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad NameLoad body Return NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareIn NameLoad NameLoad body If CompareEq NameLoad Str body If NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore NameLoad Return NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index NameLoad If NameLoad body Assign NameStore Call NameLoad GeneratorExp TupleLoad SubscriptLoad NameLoad Index NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore CompareEq NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr orelse Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad If CompareIn NameLoad ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore NameLoad If NameLoad body If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad If CompareIn NameLoad ListLoad Str Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad Str NameLoad NameLoad body Expr Str If CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return CompareEq SubscriptLoad NameLoad Index Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Return BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list
N/A N/A 
Module to provide Postgres compatibility to salt.

:configuration: In order to connect to Postgres, certain configuration is
    required in /etc/salt/minion on the relevant minions. Some sample configs
    might look like::

        postgres.host: 'localhost'
        postgres.port: '5432'
        postgres.user: 'postgres' -> db user
        postgres.pass: ''
        postgres.maintenance_db: 'postgres'

    The default for the maintenance_db is 'postgres' and in most cases it can
    be left at the default setting.
    This data can also be passed into pillar. Options passed into opts will
    overwrite options passed into pillar

:note: This module uses MD5 hashing which may not be compliant with certain
    security audits.
 __future__ absolute_import N/A datetime N/A distutils.version N/A logging N/A hashlib N/A os N/A re N/A pipes N/A tempfile N/A N/A N/A csv N/A HAS_CSV True N/A N/A N/A ImportError N/A N/A HAS_CSV False N/A salt.utils N/A salt.utils.itertools salt.exceptions SaltInvocationError N/A salt.ext.six six salt.ext.six.moves zip salt.ext.six.moves StringIO N/A log N/A N/A logging getLogger __name__ N/A _DEFAULT_PASSWORDS_ENCRYPTION True N/A _EXTENSION_NOT_INSTALLED EXTENSION NOT INSTALLED N/A _EXTENSION_INSTALLED EXTENSION INSTALLED N/A _EXTENSION_TO_UPGRADE EXTENSION TO UPGRADE N/A _EXTENSION_TO_MOVE EXTENSION TO MOVE N/A _EXTENSION_FLAGS N/A _EXTENSION_NOT_INSTALLED _EXTENSION_INSTALLED _EXTENSION_TO_UPGRADE _EXTENSION_TO_MOVE N/A _PRIVILEGES_MAP N/A a C D c t r U T w X x d * INSERT CREATE TRUNCATE CONNECT TRIGGER SELECT USAGE TEMPORARY UPDATE EXECUTE REFERENCES DELETE GRANT N/A _PRIVILEGES_OBJECTS N/A frozenset N/A schema tablespace language sequence table group database N/A _PRIVILEGE_TYPE_MAP N/A table tablespace language sequence schema database arwdDxt C U rwU UC CTc __virtual__ N/A N/A N/A N/A N/A 
    Only load this module if the psql bin exists
     N/A N/A all N/A N/A N/A N/A salt utils which psql HAS_CSV N/A N/A True N/A N/A False The postgres execution module failed to load: either the psql or initdb binary are not in the path or the csv library is not available N/A _run_psql N/A N/A cmd runas password host port user N/A None None None None None N/A N/A 
    Helper function to call psql, because the password requirement
    makes this too much code to be repeated in each function below
     N/A kwargs N/A reset_system_locale clean_env False True N/A N/A runas None N/A N/A N/A host N/A N/A host N/A N/A __salt__ N/A config.option postgres.host N/A N/A N/A host N/A N/A host startswith / N/A N/A N/A FreeBSD N/A __grains__ N/A os_family N/A N/A runas pgsql N/A N/A OpenBSD N/A __grains__ N/A os_family N/A N/A runas _postgresql N/A N/A runas postgres N/A N/A user None N/A N/A user runas N/A runas N/A N/A N/A kwargs N/A runas runas N/A N/A password None N/A N/A password N/A N/A __salt__ N/A config.option postgres.pass N/A N/A password None N/A N/A pgpassfile N/A N/A N/A salt utils mkstemp text True N/A N/A N/A N/A salt utils fopen pgpassfile w fp_ N/A N/A N/A N/A fp_ write N/A N/A {0}:{1}:*:{2}:{3} format N/A N/A N/A host N/A N/A host startswith / localhost host N/A port port * N/A user user * password N/A N/A N/A __salt__ N/A file.chown pgpassfile runas N/A N/A kwargs N/A env N/A PGPASSFILE pgpassfile N/A ret N/A N/A __salt__ N/A cmd.run_all cmd python_shell False kwargs N/A N/A N/A N/A ret get retcode 0 0 N/A N/A N/A N/A log error Error connecting to Postgresql server N/A N/A N/A password None N/A N/A N/A __salt__ N/A file.remove pgpassfile N/A N/A N/A N/A log warning Remove PGPASSFILE failed N/A ret N/A _run_initdb N/A N/A name auth user password encoding locale runas N/A password None None UTF8 None None N/A N/A 
    Helper function to call initdb
     N/A N/A runas None N/A N/A N/A FreeBSD N/A __grains__ N/A os_family N/A N/A runas pgsql N/A N/A OpenBSD N/A __grains__ N/A os_family N/A N/A runas _postgresql N/A N/A runas postgres N/A N/A user None N/A N/A user runas N/A cmd N/A N/A N/A N/A salt utils which initdb N/A N/A --pgdata={0} format name N/A N/A --username={0} format user N/A N/A --auth={0} format auth N/A N/A --encoding={0} format encoding N/A N/A locale None N/A N/A N/A N/A cmd append N/A N/A --locale={0} format locale N/A N/A password None N/A N/A pgpassfile N/A N/A N/A salt utils mkstemp text True N/A N/A N/A N/A salt utils fopen pgpassfile w fp_ N/A N/A N/A N/A fp_ write N/A N/A {0} format password N/A N/A N/A __salt__ N/A file.chown pgpassfile runas N/A N/A N/A cmd extend N/A N/A N/A --pwfile={0} format pgpassfile N/A kwargs N/A dict runas runas clean_env True N/A cmdstr N/A N/A join N/A N/A N/A pipes quote c N/A c cmd N/A ret N/A N/A __salt__ N/A cmd.run_all cmdstr python_shell False kwargs N/A N/A N/A N/A ret get retcode 0 0 N/A N/A N/A N/A log error Error initilizing the postgres data directory N/A N/A N/A password None N/A N/A N/A __salt__ N/A file.remove pgpassfile N/A N/A N/A N/A log warning Removal of PGPASSFILE failed N/A ret N/A version N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Return the version of a Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.version
     N/A query SELECT setting FROM pg_catalog.pg_settings WHERE name = 'server_version' N/A cmd N/A _psql_cmd -c query -t host host user user port port maintenance_db maintenance_db password password N/A ret N/A _run_psql cmd runas runas password password host host port port user user N/A line N/A N/A N/A N/A salt utils itertools split N/A ret N/A stdout N/A N/A line N/A _parsed_version N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Returns the server version properly parsed and int casted for internal use.

    If the Postgres server does not respond, None will be returned.
     N/A psql_version N/A version user host host port port maintenance_db maintenance_db password password runas runas N/A psql_version N/A N/A N/A N/A N/A distutils version LooseVersion psql_version N/A N/A N/A N/A log warning Attempt to parse version of Postgres server failed. Is the server responding? N/A None N/A _connection_defaults N/A N/A user host port maintenance_db password N/A None None None None None N/A N/A 
    Returns a tuple of (user, host, port, db) with config, pillar, or default
    values assigned to missing values.
     N/A N/A user N/A N/A user N/A N/A __salt__ N/A config.option postgres.user N/A N/A host N/A N/A host N/A N/A __salt__ N/A config.option postgres.host N/A N/A port N/A N/A port N/A N/A __salt__ N/A config.option postgres.port N/A N/A maintenance_db N/A N/A maintenance_db N/A N/A __salt__ N/A config.option postgres.maintenance_db N/A N/A password None N/A N/A password N/A N/A __salt__ N/A config.option postgres.pass N/A N/A user host port maintenance_db password N/A _psql_cmd N/A N/A N/A args kwargs N/A N/A 
    Return string with fully composed psql command.

    Accept optional keyword arguments: user, host and port as well as any
    number or positional arguments to be added to the end of command.
     N/A N/A user host port maintenance_db password N/A _connection_defaults N/A N/A kwargs get user N/A N/A kwargs get host N/A N/A kwargs get port N/A N/A kwargs get maintenance_db N/A N/A kwargs get password N/A cmd N/A N/A N/A N/A salt utils which psql --no-align --no-readline --no-password N/A user N/A N/A cmd N/A --username user N/A host N/A N/A cmd N/A --host host N/A port N/A N/A cmd N/A --port N/A str port N/A N/A maintenance_db N/A N/A maintenance_db postgres N/A N/A N/A cmd extend N/A --dbname maintenance_db N/A N/A N/A cmd extend args N/A cmd N/A _psql_prepare_and_run N/A N/A cmd host port maintenance_db password runas user N/A None None None None None None N/A N/A rcmd N/A _psql_cmd host host user user port port maintenance_db maintenance_db password password cmd N/A cmdret N/A _run_psql rcmd runas runas password password host host port port user user N/A cmdret N/A psql_query N/A N/A query user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Run an SQL-Query and return the results as a list. This command
    only supports SELECT statements.  This limitation can be worked around
    with a query like this:

    WITH updated AS (UPDATE pg_authid SET rolconnlimit = 2000 WHERE
    rolname = 'rolename' RETURNING rolconnlimit) SELECT * FROM updated;

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.psql_query 'select * from pg_stat_activity'
     N/A ret N/A N/A csv_query N/A N/A COPY ({0}) TO STDOUT WITH CSV HEADER format N/A N/A N/A N/A query strip rstrip ; N/A cmdret N/A _psql_prepare_and_run N/A -v datestyle=ISO,MDY -c csv_query runas runas host host user user port port maintenance_db maintenance_db password password N/A N/A N/A cmdret N/A retcode 0 N/A N/A ret N/A csv_file N/A StringIO N/A cmdret N/A stdout N/A header N/A N/A row N/A N/A csv reader csv_file delimiter , quotechar " N/A N/A N/A row N/A N/A N/A N/A header N/A N/A header row N/A N/A N/A N/A ret append N/A dict N/A zip header row N/A ret N/A db_list N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Return dictionary with information about databases of a Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.db_list
     N/A ret N/A N/A query SELECT datname as "Name", pga.rolname as "Owner", pg_encoding_to_char(encoding) as "Encoding", datcollate as "Collate", datctype as "Ctype", datacl as "Access privileges", spcname as "Tablespace" FROM pg_database pgd, pg_roles pga, pg_tablespace pgts WHERE pga.oid = pgd.datdba AND pgts.oid = pgd.dattablespace N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A row rows N/A N/A N/A ret N/A N/A row N/A Name row N/A N/A N/A N/A ret N/A N/A row N/A Name pop Name N/A ret N/A db_exists N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Checks if a database exists on the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.db_exists 'dbname'
     N/A databases N/A db_list user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A name databases N/A db_create N/A N/A name user host port maintenance_db password tablespace encoding lc_collate lc_ctype owner template runas N/A None None None None None None None None None None None None N/A N/A 
    Adds a databases to the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.db_create 'dbname'

        salt '*' postgres.db_create 'dbname' template=template_postgis

     N/A query N/A N/A CREATE DATABASE "{0}" format name N/A with_args N/A N/A N/A N/A salt utils odict OrderedDict N/A OWNER TEMPLATE ENCODING LC_COLLATE LC_CTYPE TABLESPACE N/A owner N/A N/A "{0}" format owner template N/A encoding N/A N/A '{0}' format encoding N/A lc_collate N/A N/A '{0}' format lc_collate N/A lc_ctype N/A N/A '{0}' format lc_ctype tablespace N/A with_chunks N/A N/A N/A key value N/A N/A with_args items N/A N/A N/A value None N/A N/A with_chunks N/A key = value N/A with_chunks N/A N/A N/A N/A with_chunks insert 0  WITH N/A query N/A N/A join with_chunks N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A db_alter N/A N/A name user host port maintenance_db password tablespace owner owner_recurse runas N/A None None None None None None None False None N/A N/A 
    Change tablespace or/and owner of database.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.db_alter dbname owner=otheruser
     N/A N/A N/A any N/A tablespace owner N/A N/A True N/A N/A owner owner_recurse N/A N/A ret N/A owner_to name owner user user host host port port password password runas runas N/A N/A queries N/A N/A owner N/A N/A N/A N/A queries append N/A N/A ALTER DATABASE "{0}" OWNER TO "{1}" format name owner N/A tablespace N/A N/A N/A N/A queries append N/A N/A ALTER DATABASE "{0}" SET TABLESPACE "{1}" format name tablespace N/A query queries N/A N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A N/A False N/A True N/A db_remove N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Removes a databases from the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.db_remove 'dbname'
     N/A query N/A N/A DROP DATABASE "{0}" format name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port runas runas maintenance_db maintenance_db password password N/A N/A N/A ret N/A retcode 0 N/A tablespace_list N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Return dictionary with information about tablespaces of a Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.tablespace_list

    .. versionadded:: 2015.8.0
     N/A ret N/A N/A query SELECT spcname as "Name", pga.rolname as "Owner", spcacl as "ACL", spcoptions as "Opts", pg_tablespace_location(pgts.oid) as "Location" FROM pg_tablespace pgts, pg_roles pga WHERE pga.oid = pgts.spcowner N/A rows N/A N/A __salt__ N/A postgres.psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A row rows N/A N/A N/A ret N/A N/A row N/A Name row N/A N/A N/A N/A ret N/A N/A row N/A Name pop Name N/A ret N/A tablespace_exists N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Checks if a tablespace exists on the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.tablespace_exists 'dbname'

    .. versionadded:: 2015.8.0
     N/A tablespaces N/A tablespace_list user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A name tablespaces N/A tablespace_create N/A N/A name location options owner user host port maintenance_db password runas N/A None None None None None None None None N/A N/A 
    Adds a tablespace to the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.tablespace_create tablespacename '/path/datadir'

    .. versionadded:: 2015.8.0
     N/A owner_query N/A options_query N/A owner N/A N/A owner_query N/A N/A OWNER "{0}" format owner N/A options N/A N/A optionstext N/A N/A N/A {0} = {1} format k v N/A N/A k v N/A N/A options items N/A options_query N/A N/A WITH ( {0} ) format N/A N/A ,  join optionstext N/A query N/A N/A CREATE TABLESPACE "{0}" {1} LOCATION '{2}' {3} format name owner_query location options_query N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A tablespace_alter N/A N/A name user host port maintenance_db password new_name new_owner set_option reset_option runas N/A None None None None None None None None None None N/A N/A 
    Change tablespace name, owner, or options.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.tablespace_alter tsname new_owner=otheruser
        salt '*' postgres.tablespace_alter index_space new_name=fast_raid
        salt '*' postgres.tablespace_alter test set_option="{'seq_page_cost': '1.1'}"
        salt '*' postgres.tablespace_alter tsname reset_option=seq_page_cost

    .. versionadded:: 2015.8.0
     N/A N/A N/A any N/A new_name new_owner set_option reset_option N/A N/A True N/A queries N/A N/A new_name N/A N/A N/A N/A queries append N/A N/A ALTER TABLESPACE "{0}" RENAME TO "{1}" format name new_name N/A new_owner N/A N/A N/A N/A queries append N/A N/A ALTER TABLESPACE "{0}" OWNER TO "{1}" format name new_owner N/A set_option N/A N/A N/A N/A queries append N/A N/A ALTER TABLESPACE "{0}" SET ({1} = {2}) format name N/A N/A N/A set_option keys N/A 0 N/A N/A N/A set_option values N/A 0 N/A reset_option N/A N/A N/A N/A queries append N/A N/A ALTER TABLESPACE "{0}" RESET ({1}) format name reset_option N/A query queries N/A N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A N/A False N/A True N/A tablespace_remove N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Removes a tablespace from the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.tablespace_remove tsname

    .. versionadded:: 2015.8.0
     N/A query N/A N/A DROP TABLESPACE "{0}" format name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port runas runas maintenance_db maintenance_db password password N/A N/A N/A ret N/A retcode 0 N/A user_list N/A N/A user host port maintenance_db password runas return_password N/A None None None None None None False N/A N/A 
    Return a dict with information about users of a Postgres server.

    Set return_password to True to get password hash in the result.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.user_list
     N/A ret N/A N/A ver N/A _parsed_version user user host host port port maintenance_db maintenance_db password password runas runas N/A ver N/A N/A N/A ver N/A N/A N/A distutils version LooseVersion 9.1 N/A N/A replication_column pg_roles.rolreplication N/A N/A replication_column NULL N/A N/A ver N/A N/A N/A distutils version LooseVersion 9.5 N/A N/A rolcatupdate_column NULL N/A N/A rolcatupdate_column pg_roles.rolcatupdate N/A N/A N/A N/A log error Could not retrieve Postgres version. Is Postgresql server running? N/A False N/A _x N/A N/A N/A s N/A N/A return_password s N/A query N/A N/A N/A N/A join N/A SELECT pg_roles.rolname as "name",pg_roles.rolsuper as "superuser", pg_roles.rolinherit as "inherits privileges", pg_roles.rolcreaterole as "can create roles", pg_roles.rolcreatedb as "can create databases", {0} as "can update system catalogs", pg_roles.rolcanlogin as "can login", {1} as "replication", pg_roles.rolconnlimit as "connections", pg_roles.rolvaliduntil::timestamp(0) as "expiry time", pg_roles.rolconfig  as "defaults variables"  N/A _x , COALESCE(pg_shadow.passwd, pg_authid.rolpassword) as "password"  FROM pg_roles  N/A _x LEFT JOIN pg_authid ON pg_roles.oid = pg_authid.oid  N/A _x LEFT JOIN pg_shadow ON pg_roles.oid = pg_shadow.usesysid format rolcatupdate_column replication_column N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password get_bool N/A N/A rowdict key N/A N/A N/A 
        Returns the boolean value of the key, instead of 't' and 'f' strings.
         N/A N/A N/A rowdict N/A key t N/A N/A True N/A N/A N/A N/A rowdict N/A key f N/A N/A False N/A N/A None N/A N/A row rows N/A N/A retrow N/A N/A key N/A superuser inherits privileges can create roles can create databases can update system catalogs can login replication connections N/A N/A N/A retrow N/A key N/A get_bool row key N/A date_key N/A expiry time N/A N/A N/A N/A N/A retrow N/A date_key N/A N/A N/A datetime datetime strptime N/A row N/A date_key %Y-%m-%d %H:%M:%S N/A N/A N/A N/A ValueError KeyError N/A N/A N/A retrow N/A date_key None N/A N/A retrow N/A defaults variables N/A row N/A defaults variables N/A return_password N/A N/A N/A retrow N/A password N/A row N/A password N/A N/A ret N/A N/A row N/A name retrow N/A role N/A N/A six iterkeys ret N/A N/A rdata N/A ret N/A role N/A groups N/A N/A rdata setdefault groups N/A N/A query N/A N/A select rolname from pg_user join pg_auth_members      on (pg_user.usesysid=pg_auth_members.member) join pg_roles       on (pg_roles.oid=pg_auth_members.roleid) where pg_user.usename='{0}' format role N/A N/A N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A row rows N/A N/A N/A N/A row N/A rolname groups N/A N/A N/A N/A groups append N/A row N/A rolname N/A N/A N/A Exception N/A N/A N/A ret N/A role_get N/A N/A name user host port maintenance_db password runas return_password N/A None None None None None None False N/A N/A 
    Return a dict with information about users of a Postgres server.

    Set return_password to True to get password hash in the result.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.role_get postgres
     N/A all_users N/A user_list user user host host port port maintenance_db maintenance_db password password runas runas return_password return_password N/A N/A N/A N/A N/A all_users get name None N/A N/A N/A AttributeError N/A N/A N/A N/A log error Could not retrieve Postgres role. Is Postgres running? N/A None N/A user_exists N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Checks if a user exists on the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.user_exists 'username'
     N/A N/A bool N/A role_get name user user host host port port maintenance_db maintenance_db password password runas runas return_password False N/A _add_role_flag N/A N/A string test flag cond prefix addtxt skip N/A None NO False N/A N/A N/A skip N/A N/A N/A cond None N/A N/A cond test N/A N/A test None N/A N/A cond N/A N/A string N/A N/A {0} {1} format string flag N/A N/A string N/A N/A {0} {2}{1} format string flag prefix N/A addtxt N/A N/A string N/A N/A {0} {1} format string addtxt N/A string N/A _maybe_encrypt_password N/A N/A role password encrypted N/A _DEFAULT_PASSWORDS_ENCRYPTION N/A N/A 
    pgsql passwords are md5 hashes of the string: 'md5{password}{rolename}'
     N/A N/A password None N/A N/A password N/A str password N/A N/A encrypted password N/A N/A N/A password startswith md5 N/A N/A password N/A N/A md5{0} format N/A N/A N/A N/A hashlib md5 N/A N/A N/A salt utils to_bytes N/A N/A {0}{1} format password role hexdigest N/A password N/A _role_cmd_args N/A N/A name sub_cmd typ_ encrypted login connlimit inherit createdb createuser createroles superuser groups replication rolepassword db_role N/A role None None None None None None None None None None None None N/A N/A N/A N/A createuser None N/A superuser None N/A N/A superuser createuser N/A N/A inherit None N/A N/A N/A typ_ N/A user group N/A N/A inherit True N/A N/A login None N/A N/A N/A typ_ user N/A N/A login True N/A N/A typ_ group N/A N/A login False N/A N/A encrypted None N/A N/A encrypted _DEFAULT_PASSWORDS_ENCRYPTION N/A skip_passwd False N/A escaped_password N/A N/A N/A N/A N/A rolepassword None N/A N/A isinstance rolepassword N/A six string_types N/A bool rolepassword N/A isinstance rolepassword bool N/A N/A skip_passwd True N/A N/A N/A isinstance rolepassword N/A six string_types N/A bool rolepassword N/A N/A escaped_password N/A N/A '{0}' format N/A _maybe_encrypt_password name N/A N/A rolepassword replace ' '' encrypted encrypted N/A skip_superuser False N/A N/A N/A bool db_role N/A N/A bool superuser N/A bool N/A db_role N/A superuser N/A N/A skip_superuser True N/A flags N/A N/A flag test INHERIT inherit N/A flag test CREATEDB createdb N/A flag test CREATEROLE createroles N/A flag test skip SUPERUSER superuser skip_superuser N/A flag test REPLICATION replication N/A flag test LOGIN login N/A flag test addtxt skip CONNECTION LIMIT N/A bool connlimit N/A str connlimit N/A connlimit None N/A flag test skip cond prefix ENCRYPTED N/A N/A encrypted None N/A bool rolepassword N/A skip_passwd N/A isinstance rolepassword bool encrypted UN N/A flag test skip addtxt PASSWORD N/A bool rolepassword skip_passwd escaped_password N/A data flags N/A N/A sub_cmd N/A _add_role_flag sub_cmd data N/A N/A N/A sub_cmd endswith WITH N/A N/A sub_cmd N/A N/A sub_cmd replace  WITH N/A groups N/A N/A N/A isinstance groups list N/A N/A groups N/A N/A , join groups N/A group N/A N/A groups split , N/A N/A sub_cmd N/A N/A {0}; GRANT "{1}" TO "{2}" format sub_cmd group name N/A sub_cmd N/A _role_create N/A N/A name user host port maintenance_db password createdb createroles createuser encrypted superuser login connlimit inherit replication rolepassword typ_ groups runas N/A None None None None None None None None None None None None None None None role None None N/A N/A 
    Creates a Postgres role. Users and Groups are both roles in postgres.
    However, users can login, groups cannot.
     N/A N/A user_exists name user host port maintenance_db password password runas runas N/A N/A N/A N/A log info N/A N/A {0} '{1}' already exists format N/A N/A typ_ capitalize name N/A False N/A sub_cmd N/A N/A CREATE ROLE "{0}" WITH format name N/A sub_cmd N/A N/A {0} {1} format sub_cmd N/A _role_cmd_args name typ_ typ_ encrypted encrypted login login connlimit connlimit inherit inherit createdb createdb createroles createroles createuser createuser superuser superuser groups groups replication replication rolepassword rolepassword N/A ret N/A _psql_prepare_and_run N/A -c sub_cmd runas runas host host user user port port maintenance_db maintenance_db password password N/A N/A N/A ret N/A retcode 0 N/A user_create N/A N/A username user host port maintenance_db password createdb createuser createroles inherit login connlimit encrypted superuser replication rolepassword groups runas N/A None None None None None None None None None None None None None None None None None N/A N/A 
    Creates a Postgres user.

    CLI Examples:

    .. code-block:: bash

        salt '*' postgres.user_create 'username' user='user' \
                host='hostname' port='port' password='password' \
                rolepassword='rolepassword'
     N/A N/A _role_create username typ_ user user user host host port port maintenance_db maintenance_db password password createdb createdb createuser createuser createroles createroles inherit inherit login login connlimit connlimit encrypted encrypted superuser superuser replication replication rolepassword rolepassword groups groups runas runas N/A _role_update N/A N/A name user host port maintenance_db password createdb createuser typ_ createroles inherit login connlimit encrypted superuser replication rolepassword groups runas N/A None None None None None None None role None None None None None None None None None None N/A N/A 
    Updates a postgres role.
     N/A role N/A role_get name user user host host port port maintenance_db maintenance_db password password runas runas return_password False N/A N/A N/A bool role N/A N/A N/A N/A log info N/A N/A {0} '{1}' could not be found format N/A N/A typ_ capitalize name N/A False N/A sub_cmd N/A N/A ALTER ROLE "{0}" WITH format name N/A sub_cmd N/A N/A {0} {1} format sub_cmd N/A _role_cmd_args name encrypted encrypted login login connlimit connlimit inherit inherit createdb createdb createuser createuser createroles createroles superuser superuser groups groups replication replication rolepassword rolepassword db_role role N/A ret N/A _psql_prepare_and_run N/A -c sub_cmd runas runas host host user user port port maintenance_db maintenance_db password password N/A N/A N/A ret N/A retcode 0 N/A user_update N/A N/A username user host port maintenance_db password createdb createuser createroles encrypted superuser inherit login connlimit replication rolepassword groups runas N/A None None None None None None None None None None None None None None None None None N/A N/A 
    Updates a Postgres user.

    CLI Examples:

    .. code-block:: bash

        salt '*' postgres.user_update 'username' user='user' \
                host='hostname' port='port' password='password' \
                rolepassword='rolepassword'
     N/A N/A _role_update username user user host host port port maintenance_db maintenance_db password password typ_ user inherit inherit login login connlimit connlimit createdb createdb createuser createuser createroles createroles encrypted encrypted superuser superuser replication replication rolepassword rolepassword groups groups runas runas N/A _role_remove N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Removes a role from the Postgres Server
     N/A N/A N/A user_exists name user host port maintenance_db password password runas runas N/A N/A N/A N/A log info N/A N/A User '{0}' does not exist format name N/A False N/A sub_cmd N/A N/A DROP ROLE "{0}" format name N/A N/A _psql_prepare_and_run N/A -c sub_cmd runas runas host host user user port port maintenance_db maintenance_db password password N/A N/A N/A user_exists name user host port maintenance_db password password runas runas N/A N/A True N/A N/A N/A N/A log info N/A N/A Failed to delete user '{0}'. format name N/A False N/A available_extensions N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    List available postgresql extensions

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.available_extensions

     N/A exts N/A N/A query select * from pg_available_extensions(); N/A ret N/A psql_query query user user host host port port maintenance_db maintenance_db password password runas runas N/A exts N/A N/A row ret N/A N/A N/A N/A default_version row N/A name row N/A N/A N/A exts N/A N/A row N/A name row N/A exts N/A installed_extensions N/A N/A user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    List installed postgresql extensions

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.installed_extensions

     N/A exts N/A N/A query select a.*, b.nspname as schema_name from pg_extension a,  pg_namespace b where a.extnamespace = b.oid; N/A ret N/A psql_query query user user host host port port maintenance_db maintenance_db password password runas runas N/A exts N/A N/A row ret N/A N/A N/A N/A extversion row N/A extname row N/A N/A N/A exts N/A N/A row N/A extname row N/A exts N/A get_available_extension N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Get info about an available postgresql extension

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.get_available_extension plpgsql

     N/A N/A N/A N/A available_extensions user user host host port port maintenance_db maintenance_db password password runas runas get name None N/A get_installed_extension N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Get info about an installed postgresql extension

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.get_installed_extension plpgsql

     N/A N/A N/A N/A installed_extensions user user host host port port maintenance_db maintenance_db password password runas runas get name None N/A is_available_extension N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Test if a specific extension is available

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.is_available_extension

     N/A exts N/A available_extensions user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A N/A name lower N/A N/A N/A a lower N/A a exts N/A N/A True N/A False N/A _pg_is_older_ext_ver N/A N/A a b N/A N/A N/A Return true if version a is lesser than b
    TODO: be more intelligent to test versions

     N/A N/A a b N/A is_installed_extension N/A N/A name user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Test if a specific extension is installed

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.is_installed_extension

     N/A installed_ext N/A get_installed_extension name user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A bool installed_ext N/A create_metadata N/A N/A name ext_version schema user host port maintenance_db password runas N/A None None None None None None None None N/A N/A 
    Get lifecycle information about an extension

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.create_metadata adminpack

     N/A installed_ext N/A get_installed_extension name user user host host port port maintenance_db maintenance_db password password runas runas N/A ret N/A _EXTENSION_NOT_INSTALLED N/A installed_ext N/A N/A ret N/A _EXTENSION_INSTALLED N/A N/A N/A ext_version None N/A _pg_is_older_ext_ver N/A N/A installed_ext get extversion ext_version ext_version N/A N/A N/A N/A ret append _EXTENSION_TO_UPGRADE N/A N/A N/A schema None N/A N/A N/A installed_ext get extrelocatable f t N/A N/A N/A installed_ext get schema_name schema schema N/A N/A N/A N/A ret append _EXTENSION_TO_MOVE N/A ret N/A drop_extension N/A N/A name if_exists restrict cascade user host port maintenance_db password runas N/A None None None None None None None None None N/A N/A 
    Drop an installed postgresql extension

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.drop_extension 'adminpack'

     N/A N/A cascade None N/A N/A cascade True N/A N/A if_exists None N/A N/A if_exists False N/A N/A restrict None N/A N/A restrict False N/A args N/A DROP EXTENSION N/A if_exists N/A N/A N/A N/A args append IF EXISTS N/A N/A N/A args append name N/A cascade N/A N/A N/A N/A args append CASCADE N/A restrict N/A N/A N/A N/A args append RESTRICT N/A N/A N/A args append ; N/A cmd N/A N/A join args N/A N/A is_installed_extension name user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A _psql_prepare_and_run N/A -c cmd runas runas host host user user port port maintenance_db maintenance_db password password N/A ret N/A N/A is_installed_extension name user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A ret N/A N/A N/A N/A log info N/A N/A Failed to drop ext: {0} format name N/A ret N/A create_extension N/A N/A name if_not_exists schema ext_version from_version user host port maintenance_db password runas N/A None None None None None None None None None None N/A N/A 
    Install a postgresql extension

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.create_extension 'adminpack'

     N/A N/A if_not_exists None N/A N/A if_not_exists True N/A mtdata N/A create_metadata name ext_version ext_version schema schema user user host host port port maintenance_db maintenance_db password password runas runas N/A installed N/A _EXTENSION_NOT_INSTALLED mtdata N/A installable N/A is_available_extension name user user host host port port maintenance_db maintenance_db password password runas runas N/A installable N/A N/A N/A installed N/A N/A args N/A CREATE EXTENSION N/A if_not_exists N/A N/A N/A N/A args append IF NOT EXISTS N/A N/A N/A args append N/A N/A "{0}" format name N/A sargs N/A N/A schema N/A N/A N/A N/A sargs append N/A N/A SCHEMA "{0}" format schema N/A ext_version N/A N/A N/A N/A sargs append N/A N/A VERSION {0} format ext_version N/A from_version N/A N/A N/A N/A sargs append N/A N/A FROM {0} format from_version N/A sargs N/A N/A N/A N/A args append WITH N/A N/A N/A args extend sargs N/A N/A N/A args append ; N/A cmd N/A N/A N/A N/A join args strip N/A N/A args N/A N/A N/A schema N/A _EXTENSION_TO_MOVE mtdata N/A N/A N/A N/A args append N/A N/A ALTER EXTENSION "{0}" SET SCHEMA "{1}"; format name schema N/A N/A ext_version N/A _EXTENSION_TO_UPGRADE mtdata N/A N/A N/A N/A args append N/A N/A ALTER EXTENSION "{0}" UPDATE TO {1}; format name ext_version N/A cmd N/A N/A N/A N/A join args strip N/A cmd N/A N/A N/A _psql_prepare_and_run N/A -c cmd runas runas host host user user port port maintenance_db maintenance_db password password N/A mtdata N/A create_metadata name ext_version ext_version schema schema user user host host port port maintenance_db maintenance_db password password runas runas N/A ret True N/A i _EXTENSION_FLAGS N/A N/A N/A N/A i mtdata N/A i _EXTENSION_INSTALLED N/A N/A ret False N/A N/A ret N/A N/A N/A N/A log info N/A N/A Failed to create ext: {0} format name N/A ret N/A user_remove N/A N/A username user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Removes a user from the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.user_remove 'username'
     N/A N/A _role_remove username user user host host port port maintenance_db maintenance_db password password runas runas N/A group_create N/A N/A groupname user host port maintenance_db password createdb createuser createroles encrypted login inherit superuser replication rolepassword groups runas N/A None None None None None None None None None None None None None None None None N/A N/A 
    Creates a Postgres group. A group is postgres is similar to a user, but
    cannot login.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.group_create 'groupname' user='user' \
                host='hostname' port='port' password='password' \
                rolepassword='rolepassword'
     N/A N/A _role_create groupname user user typ_ group host host port port maintenance_db maintenance_db password password createdb createdb createroles createroles createuser createuser encrypted encrypted login login inherit inherit superuser superuser replication replication rolepassword rolepassword groups groups runas runas N/A group_update N/A N/A groupname user host port maintenance_db password createdb createroles createuser encrypted inherit login superuser replication rolepassword groups runas N/A None None None None None None None None None None None None None None None None N/A N/A 
    Updates a postgres group

    CLI Examples:

    .. code-block:: bash

        salt '*' postgres.group_update 'username' user='user' \
                host='hostname' port='port' password='password' \
                rolepassword='rolepassword'
     N/A N/A _role_update groupname user user host host port port maintenance_db maintenance_db password password createdb createdb typ_ group createroles createroles createuser createuser encrypted encrypted login login inherit inherit superuser superuser replication replication rolepassword rolepassword groups groups runas runas N/A group_remove N/A N/A groupname user host port maintenance_db password runas N/A None None None None None None N/A N/A 
    Removes a group from the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.group_remove 'groupname'
     N/A N/A _role_remove groupname user user host host port port maintenance_db maintenance_db password password runas runas N/A owner_to N/A N/A dbname ownername user host port password runas N/A None None None None None N/A N/A 
    Set the owner of all schemas, functions, tables, views and sequences to
    the given username.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.owner_to 'dbname' 'username'
     N/A sqlfile N/A N/A tempfile NamedTemporaryFile N/A N/A N/A sqlfile write begin;
 N/A N/A N/A sqlfile write N/A N/A alter database "{0}" owner to "{1}";
 format dbname ownername N/A queries N/A N/A alter schema {n} owner to {owner}; select quote_ident(schema_name) as n from information_schema.schemata; N/A alter table {n} owner to {owner}; select quote_ident(table_schema)||'.'||quote_ident(table_name) as n from information_schema.tables where table_schema not in ('pg_catalog', 'information_schema'); N/A alter function {n} owner to {owner}; select p.oid::regprocedure::text as n from pg_catalog.pg_proc p join pg_catalog.pg_namespace ns on p.pronamespace=ns.oid where ns.nspname not in ('pg_catalog', 'information_schema')  and not p.proisagg; N/A alter aggregate {n} owner to {owner}; select p.oid::regprocedure::text as n from pg_catalog.pg_proc p join pg_catalog.pg_namespace ns on p.pronamespace=ns.oid where ns.nspname not in ('pg_catalog', 'information_schema') and p.proisagg; N/A alter sequence {n} owner to {owner}; select quote_ident(sequence_schema)||'.'||quote_ident(sequence_name) as n from information_schema.sequences; N/A N/A fmt query queries N/A N/A ret N/A psql_query query user user host host port port maintenance_db dbname password password runas runas N/A row ret N/A N/A N/A N/A sqlfile write N/A N/A N/A fmt format owner ownername n N/A row N/A n N/A N/A N/A sqlfile write commit;
 N/A N/A N/A sqlfile flush N/A N/A N/A os chmod N/A sqlfile name 420 N/A cmdret N/A _psql_prepare_and_run N/A -f N/A sqlfile name user user runas runas host host port port password password maintenance_db dbname N/A cmdret N/A schema_create N/A N/A dbname name owner user db_user db_password db_host db_port N/A None None None None None None N/A N/A 
    Creates a Postgres schema.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.schema_create dbname name owner='owner' \
                user='user' \
                db_user='user' db_password='password'
                db_host='hostname' db_port='port'
     N/A N/A schema_exists dbname name db_user db_user db_password db_password db_host db_host db_port db_port N/A N/A N/A N/A log info N/A N/A '{0}' already exists in '{1}' format name dbname N/A False N/A sub_cmd N/A N/A CREATE SCHEMA "{0}" format name N/A N/A owner None N/A N/A sub_cmd N/A N/A {0} AUTHORIZATION "{1}" format sub_cmd owner N/A ret N/A _psql_prepare_and_run N/A -c sub_cmd user db_user password db_password port db_port host db_host maintenance_db dbname runas user N/A N/A N/A ret N/A retcode 0 N/A schema_remove N/A N/A dbname name user db_user db_password db_host db_port N/A None None None None None N/A N/A 
    Removes a schema from the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.schema_remove dbname schemaname

    dbname
        Database name we work on

    schemaname
        The schema's name we'll remove

    user
        System user all operations should be performed on behalf of

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default

     N/A N/A N/A schema_exists dbname name db_user db_user db_password db_password db_host db_host db_port db_port N/A N/A N/A N/A log info N/A N/A Schema '{0}' does not exist in '{1}' format name dbname N/A False N/A sub_cmd N/A N/A DROP SCHEMA "{0}" format name N/A N/A _psql_prepare_and_run N/A -c sub_cmd runas user maintenance_db dbname host db_host user db_user port db_port password db_password N/A N/A N/A schema_exists dbname name db_user db_user db_password db_password db_host db_host db_port db_port N/A N/A True N/A N/A N/A N/A log info N/A N/A Failed to delete schema '{0}'. format name N/A False N/A schema_exists N/A N/A dbname name db_user db_password db_host db_port N/A None None None None N/A N/A 
    Checks if a schema exists on the Postgres server.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.schema_exists dbname schemaname

    dbname
        Database name we query on

    name
       Schema name we look for

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default

     N/A N/A bool N/A schema_get dbname name db_user db_user db_host db_host db_port db_port db_password db_password N/A schema_get N/A N/A dbname name db_user db_password db_host db_port N/A None None None None N/A N/A 
    Return a dict with information about schemas in a database.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.schema_get dbname name

    dbname
        Database name we query on

    name
       Schema name we look for

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
     N/A all_schemas N/A schema_list dbname db_user db_user db_host db_host db_port db_port db_password db_password N/A N/A N/A N/A N/A all_schemas get name None N/A N/A N/A AttributeError N/A N/A N/A N/A log error Could not retrieve Postgres schema. Is Postgres running? N/A False N/A schema_list N/A N/A dbname db_user db_password db_host db_port N/A None None None None N/A N/A 
    Return a dict with information about schemas in a Postgres database.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.schema_list dbname

    dbname
        Database name we query on

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
     N/A ret N/A N/A query N/A N/A join N/A SELECT pg_namespace.nspname as "name",pg_namespace.nspacl as "acl", pg_roles.rolname as "owner" FROM pg_namespace LEFT JOIN pg_roles ON pg_roles.oid = pg_namespace.nspowner  N/A rows N/A psql_query query host db_host user db_user port db_port maintenance_db dbname password db_password N/A row rows N/A N/A retrow N/A N/A key N/A owner acl N/A N/A N/A retrow N/A key N/A row N/A key N/A N/A ret N/A N/A row N/A name retrow N/A ret N/A language_list N/A N/A maintenance_db user host port password runas N/A None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Return a list of languages in a database.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_list dbname

    maintenance_db
        The database to check

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A ret N/A N/A query SELECT lanname AS "Name" FROM pg_language N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A row rows N/A N/A N/A ret N/A N/A row N/A Name N/A row N/A Name N/A ret N/A language_exists N/A N/A name maintenance_db user host port password runas N/A None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Checks if language exists in a database.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_exists plpgsql dbname

    name
       Language to check for

    maintenance_db
        The database to check in

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of

     N/A languages N/A language_list maintenance_db user user host host port port password password runas runas N/A N/A name languages N/A language_create N/A N/A name maintenance_db user host port password runas N/A None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Installs a language into a database

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_create plpgsql dbname

    name
       Language to install

    maintenance_db
        The database to install the language in

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A N/A language_exists name maintenance_db N/A N/A N/A N/A log info Language %s already exists in %s name maintenance_db N/A False N/A query N/A N/A CREATE LANGUAGE {0} format name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A language_remove N/A N/A name maintenance_db user host port password runas N/A None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Removes a language from a database

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.language_remove plpgsql dbname

    name
       Language to remove

    maintenance_db
        The database to install the language in

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A N/A N/A language_exists name maintenance_db N/A N/A N/A N/A log info Language %s does not exist in %s name maintenance_db N/A False N/A query N/A N/A DROP LANGUAGE {0} format name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port runas runas maintenance_db maintenance_db password password N/A N/A N/A ret N/A retcode 0 N/A _make_privileges_list_query N/A N/A name object_type prepend N/A N/A N/A 
    Generate the SQL required for specific object type
     N/A N/A object_type table N/A N/A query N/A N/A N/A N/A join N/A SELECT relacl AS name FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE nspname = '{0}' AND relname = '{1}' AND relkind = 'r' ORDER BY relname format prepend name N/A N/A N/A object_type sequence N/A N/A query N/A N/A N/A N/A join N/A SELECT relacl AS name FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE nspname = '{0}' AND relname = '{1}' AND relkind = 'S' ORDER BY relname format prepend name N/A N/A N/A object_type schema N/A N/A query N/A N/A N/A N/A join N/A SELECT nspacl AS name FROM pg_catalog.pg_namespace WHERE nspname = '{0}' ORDER BY nspname format name N/A N/A N/A object_type tablespace N/A N/A query N/A N/A N/A N/A join N/A SELECT spcacl AS name FROM pg_catalog.pg_tablespace WHERE spcname = '{0}' ORDER BY spcname format name N/A N/A N/A object_type language N/A N/A query N/A N/A N/A N/A join N/A SELECT lanacl AS name FROM pg_catalog.pg_language WHERE lanname = '{0}' ORDER BY lanname format name N/A N/A N/A object_type database N/A N/A query N/A N/A N/A N/A join N/A SELECT datacl AS name FROM pg_catalog.pg_database WHERE datname = '{0}' ORDER BY datname format name N/A N/A N/A object_type group N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname, admin_option FROM pg_catalog.pg_auth_members m JOIN pg_catalog.pg_roles r ON m.member=r.oid WHERE m.roleid IN (SELECT oid FROM pg_catalog.pg_roles WHERE rolname='{0}') ORDER BY rolname format name N/A query N/A _get_object_owner N/A N/A name object_type prepend maintenance_db user host port password runas N/A public None None None None None None N/A N/A 
    Return the owner of a postgres object
     N/A N/A object_type table N/A N/A query N/A N/A N/A N/A join N/A SELECT tableowner AS name FROM pg_tables WHERE schemaname = '{0}' AND tablename = '{1}' format prepend name N/A N/A N/A object_type sequence N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname AS name FROM pg_catalog.pg_class c JOIN pg_roles r ON c.relowner = r.oid JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE relkind='S' AND nspname='{0}' AND relname = '{1}' format prepend name N/A N/A N/A object_type schema N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname AS name FROM pg_namespace n JOIN pg_roles r ON n.nspowner = r.oid WHERE nspname = '{0}' format name N/A N/A N/A object_type tablespace N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname AS name FROM pg_tablespace t JOIN pg_roles r ON t.spcowner = r.oid WHERE spcname = '{0}' format name N/A N/A N/A object_type language N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname AS name FROM pg_language l JOIN pg_roles r ON l.lanowner = r.oid WHERE lanname = '{0}' format name N/A N/A N/A object_type database N/A N/A query N/A N/A N/A N/A join N/A SELECT rolname AS name FROM pg_database d JOIN pg_roles r ON d.datdba = r.oid WHERE datname = '{0}' format name N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A N/A N/A ret N/A N/A rows N/A 0 N/A name N/A N/A N/A IndexError N/A N/A ret None N/A ret N/A _validate_privileges N/A N/A object_type privs privileges N/A N/A N/A 
    Validate the supplied privileges
     N/A N/A object_type group N/A N/A _perms N/A N/A _PRIVILEGES_MAP N/A perm N/A perm N/A _PRIVILEGE_TYPE_MAP N/A object_type N/A N/A N/A _perms append ALL N/A N/A object_type _PRIVILEGES_OBJECTS N/A N/A N/A SaltInvocationError N/A N/A Invalid object_type: {0} provided format object_type N/A N/A N/A N/A N/A set privs issubset N/A set _perms N/A N/A N/A SaltInvocationError N/A N/A Invalid privilege(s): {0} provided for object {1} format privileges object_type N/A N/A privileges N/A N/A N/A SaltInvocationError The privileges option should not be set for object_type group N/A _mod_priv_opts N/A N/A object_type privileges N/A N/A N/A 
    Format options
     N/A object_type N/A N/A object_type lower N/A privileges N/A N/A privileges None privileges N/A _privs N/A N/A re split \s?,\s? N/A N/A privileges upper N/A N/A object_type privileges _privs N/A _process_priv_part N/A N/A perms N/A N/A N/A 
    Process part
     N/A _tmp N/A N/A previous None N/A perm perms N/A N/A N/A previous None N/A N/A N/A _tmp N/A N/A _PRIVILEGES_MAP N/A perm False N/A previous N/A _PRIVILEGES_MAP N/A perm N/A N/A N/A perm * N/A N/A N/A _tmp N/A previous True N/A N/A N/A _tmp N/A N/A _PRIVILEGES_MAP N/A perm False N/A previous N/A _PRIVILEGES_MAP N/A perm N/A _tmp N/A privileges_list N/A N/A name object_type prepend maintenance_db user host port password runas N/A public None None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Return a list of privileges for the specified object.

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.privileges_list table_name table maintenance_db=db_name

    name
       Name of the object for which the permissions should be returned

    object_type
       The object type, which can be one of the following:

       - table
       - sequence
       - schema
       - tablespace
       - language
       - database
       - group

    prepend
        Table and Sequence object types live under a schema so this should be
        provided if the object is not under the default `public` schema

    maintenance_db
        The database to connect to

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A object_type N/A N/A object_type lower N/A query N/A _make_privileges_list_query name object_type prepend N/A N/A object_type _PRIVILEGES_OBJECTS N/A N/A N/A SaltInvocationError N/A N/A Invalid object_type: {0} provided format object_type N/A rows N/A psql_query query runas runas host host user user port port maintenance_db maintenance_db password password N/A ret N/A N/A row rows N/A N/A N/A object_type group N/A N/A result N/A row N/A name N/A result N/A N/A result strip {} N/A parts N/A N/A result split , N/A part parts N/A N/A N/A perms_part _ N/A N/A part split / N/A N/A rolename perms N/A N/A perms_part split = N/A N/A rolename N/A N/A rolename public N/A _tmp N/A _process_priv_part perms N/A N/A ret N/A rolename _tmp N/A N/A N/A N/A row N/A admin_option t N/A N/A admin_option True N/A N/A admin_option False N/A N/A ret N/A N/A row N/A rolname admin_option N/A ret N/A has_privileges N/A N/A name object_name object_type privileges grant_option prepend maintenance_db user host port password runas N/A None None public None None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Check if a role has the specified privileges on an object

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.has_privileges user_name table_name table \
        SELECT,INSERT maintenance_db=db_name

    name
       Name of the role whose privilages should be checked on object_type

    object_name
       Name of the object on which the check is to be performed

    object_type
       The object type, which can be one of the following:

       - table
       - sequence
       - schema
       - tablespace
       - language
       - database
       - group

    privileges
       Comma separated list of privilages to check, from the list below:

       - INSERT
       - CREATE
       - TRUNCATE
       - CONNECT
       - TRIGGER
       - SELECT
       - USAGE
       - TEMPORARY
       - UPDATE
       - EXECUTE
       - REFERENCES
       - DELETE
       - ALL

    grant_option
        If grant_option is set to True, the grant option check is performed

    prepend
        Table and Sequence object types live under a schema so this should be
        provided if the object is not under the default `public` schema

    maintenance_db
        The database to connect to

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A N/A object_type privileges _privs N/A _mod_priv_opts object_type privileges N/A N/A _validate_privileges object_type _privs privileges N/A N/A object_type group N/A N/A owner N/A _get_object_owner object_name object_type prepend prepend maintenance_db maintenance_db user user host host port port password password runas runas N/A N/A N/A owner None N/A name owner N/A N/A True N/A _privileges N/A privileges_list object_name object_type prepend prepend maintenance_db maintenance_db user user host host port port password password runas runas N/A N/A name _privileges N/A N/A N/A object_type group N/A N/A grant_option N/A N/A retval N/A _privileges N/A name N/A N/A retval True N/A retval N/A N/A _perms N/A _PRIVILEGE_TYPE_MAP N/A object_type N/A grant_option N/A N/A perms N/A dict N/A N/A N/A _PRIVILEGES_MAP N/A perm True N/A perm _perms N/A retval N/A perms N/A _privileges N/A name N/A N/A perms N/A N/A _PRIVILEGES_MAP N/A perm N/A perm _perms N/A N/A ALL _privs N/A N/A retval N/A N/A N/A perms sort N/A N/A N/A N/A N/A _privileges N/A name keys sort N/A N/A retval N/A N/A N/A set _privs issubset N/A set N/A N/A N/A _privileges N/A name keys N/A retval N/A False N/A privileges_grant N/A N/A name object_name object_type privileges grant_option prepend maintenance_db user host port password runas N/A None None public None None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Grant privileges on a postgres object

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.privileges_grant user_name table_name table \
        SELECT,UPDATE maintenance_db=db_name

    name
       Name of the role to which privilages should be granted

    object_name
       Name of the object on which the grant is to be performed

    object_type
       The object type, which can be one of the following:

       - table
       - sequence
       - schema
       - tablespace
       - language
       - database
       - group

    privileges
       Comma separated list of privilages to grant, from the list below:

       - INSERT
       - CREATE
       - TRUNCATE
       - CONNECT
       - TRIGGER
       - SELECT
       - USAGE
       - TEMPORARY
       - UPDATE
       - EXECUTE
       - REFERENCES
       - DELETE
       - ALL

    grant_option
        If grant_option is set to True, the recipient of the privilege can
        in turn grant it to others

    prepend
        Table and Sequence object types live under a schema so this should be
        provided if the object is not under the default `public` schema

    maintenance_db
        The database to connect to

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A N/A object_type privileges _privs N/A _mod_priv_opts object_type privileges N/A N/A _validate_privileges object_type _privs privileges N/A N/A has_privileges name object_name object_type privileges prepend prepend maintenance_db maintenance_db user user host host port port password password runas runas N/A N/A N/A N/A log info The object: %s of type: %s already has privileges: %s set object_name object_type privileges N/A False N/A _grants N/A N/A , join _privs N/A N/A object_type N/A table sequence N/A N/A on_part N/A N/A {0}.{1} format prepend object_name N/A N/A on_part object_name N/A grant_option N/A N/A N/A object_type group N/A N/A query N/A N/A GRANT {0} TO {1} WITH ADMIN OPTION format object_name name N/A N/A query N/A N/A GRANT {0} ON {1} {2} TO {3} WITH GRANT OPTION format _grants N/A N/A object_type upper on_part name N/A N/A N/A object_type group N/A N/A query N/A N/A GRANT {0} TO {1} format object_name name N/A N/A query N/A N/A GRANT {0} ON {1} {2} TO {3} format _grants N/A N/A object_type upper on_part name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A privileges_revoke N/A N/A name object_name object_type privileges prepend maintenance_db user host port password runas N/A None public None None None None None None N/A N/A 
    .. versionadded:: 2016.3.0

    Revoke privileges on a postgres object

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.privileges_revoke user_name table_name table \
        SELECT,UPDATE maintenance_db=db_name

    name
       Name of the role whose privilages should be revoked

    object_name
       Name of the object on which the revoke is to be performed

    object_type
       The object type, which can be one of the following:

       - table
       - sequence
       - schema
       - tablespace
       - language
       - database
       - group

    privileges
       Comma separated list of privilages to revoke, from the list below:

       - INSERT
       - CREATE
       - TRUNCATE
       - CONNECT
       - TRIGGER
       - SELECT
       - USAGE
       - TEMPORARY
       - UPDATE
       - EXECUTE
       - REFERENCES
       - DELETE
       - ALL

    maintenance_db
        The database to connect to

    user
        database username if different from config or default

    password
        user password if any password for a specified user

    host
        Database host if different from config or default

    port
        Database port if different from config or default

    runas
        System user all operations should be performed on behalf of
     N/A N/A object_type privileges _privs N/A _mod_priv_opts object_type privileges N/A N/A _validate_privileges object_type _privs privileges N/A N/A N/A has_privileges name object_name object_type privileges prepend prepend maintenance_db maintenance_db user user host host port port password password runas runas N/A N/A N/A N/A log info The object: %s of type: %s does not have privileges: %s set object_name object_type privileges N/A False N/A _grants N/A N/A , join _privs N/A N/A object_type N/A table sequence N/A N/A on_part N/A N/A {0}.{1} format prepend object_name N/A N/A on_part object_name N/A N/A object_type group N/A N/A query N/A N/A REVOKE {0} FROM {1} format object_name name N/A N/A query N/A N/A REVOKE {0} ON {1} {2} FROM {3} format _grants N/A N/A object_type upper on_part name N/A ret N/A _psql_prepare_and_run N/A -c query user user host host port port maintenance_db maintenance_db password password runas runas N/A N/A N/A ret N/A retcode 0 N/A datadir_init N/A N/A name auth user password encoding locale runas N/A password None None UTF8 None None N/A N/A 
    .. versionadded:: 2016.3.0

    Initializes a postgres data directory

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.datadir_init '/var/lib/pgsql/data'

    name
        The name of the directory to initialize

    auth
        The default authentication method for local connections

    password
        The password to set for the postgres user

    user
        The database superuser name

    encoding
        The default encoding for new databases

    locale
        The default locale for new databases

    runas
        The system user the operation should be performed on behalf of
     N/A N/A N/A N/A N/A salt utils which initdb None N/A N/A N/A N/A log error initdb not found in path N/A False N/A N/A datadir_exists name N/A N/A N/A N/A log info %s already exists name N/A False N/A ret N/A _run_initdb name auth auth user user password password encoding encoding locale locale runas runas N/A N/A N/A ret N/A retcode 0 N/A datadir_exists N/A N/A name N/A N/A N/A 
    .. versionadded:: 2016.3.0

    Checks if postgres data directory has been initialized

    CLI Example:

    .. code-block:: bash

        salt '*' postgres.datadir_exists '/var/lib/pgsql/data'

    name
        Name of the directory to check
     N/A _version_file N/A N/A N/A os path join name PG_VERSION N/A _config_file N/A N/A N/A os path join name postgresql.conf N/A N/A N/A N/A N/A os path isfile _version_file N/A N/A N/A os path isfile _config_file N/A