Module Expr Str ImportFrom alias Import alias ImportFrom alias alias alias alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias identifier TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ImportFrom alias alias alias alias alias alias alias alias alias alias alias Assign NameStore Call NameLoad ListLoad 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 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 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 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 TupleLoad Num Num Assign NameStore TupleLoad Num Num Num Num Assign NameStore TupleLoad Num Num Num Num Num Num Num ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad keyword AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Num orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list Return NameLoad orelse Return NameLoad decorator_list decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore Str ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Num If Call NameLoad NameLoad NameLoad body If NameLoad body Assign NameStore Call NameLoad BinOpAdd AttributeLoad NameLoad attr NameLoad BinOpAdd AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr orelse AugAssignAdd NameStore NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Return Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Return Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Return Call Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad NameLoad AttributeLoad NameLoad attr body If CompareIn AttributeLoad NameLoad attr ListLoad Str Str Str body Return TupleLoad NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad NameLoad decorator_list decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareEq NameLoad Num BoolOpAnd CompareIs NameLoad NameLoad BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Num TupleLoad NameLoad NameLoad body If NameLoad body Return Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad orelse Return Call NameLoad NameLoad orelse Return Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad IfExp CompareIsNot NameLoad NameLoad BinOpSub NameLoad Num NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr IfExp AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Return NameLoad decorator_list decorator_list Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return If BoolOpOr UnaryOpNot NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str orelse Assign NameStore SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad Assign NameStore CompareIn AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list decorator_list Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr 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 Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults kwarg body Return BinOpMod Str Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr If NameLoad body Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Return BinOpAdd BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad IfExp NameLoad BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Return BinOpAdd BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad IfExp NameLoad BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body If CompareNotEq Call AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Str orelse If Call NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Return BinOpAdd BinOpAdd Str Call AttributeLoad Str attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad NameLoad attr Str orelse Return BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str orelse Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str orelse Assign NameStore Str If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr GeneratorExp IfExp Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr NameLoad keyword NameLoad comprehension NameStore NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body AugAssignAdd NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Dict comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpAdd Str Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad If CompareGt Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad Return BinOpMod Str TupleLoad NameLoad NameLoad NameLoad orelse Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr CompareIs NameLoad AttributeLoad AttributeLoad NameLoad attr attr BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad BoolOpAnd Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore Str orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore Str orelse AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad If UnaryOpNot AttributeLoad NameLoad attr body AugAssignAdd NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Return BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Str attr GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Return BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str If AttributeLoad NameLoad attr body AugAssignAdd NameStore Str AugAssignAdd NameStore Str Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If NameLoad body AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If NameLoad body AugAssignAdd NameStore BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str AugAssignAdd NameStore BinOpMod Str Call AttributeLoad Str attr ListComp BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr IfExp UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad IfExp BoolOpAnd Call NameLoad NameLoad Str CompareIn AttributeLoad NameLoad attr NameLoad BinOpAdd Str SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Str comprehension NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad AugAssignAdd NameStore BinOpAdd Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad AugAssignAdd NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return Str orelse Return BinOpMod Str Dict Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpMod Str TupleLoad BoolOpOr BoolOpAnd Call NameLoad NameLoad Str NameLoad BinOpMod Str AttributeLoad NameLoad attr Str BinOpAdd BoolOpOr BoolOpAnd AttributeLoad NameLoad attr Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpMod Str TupleLoad BoolOpOr BoolOpAnd Call NameLoad NameLoad Str NameLoad BinOpMod Str AttributeLoad NameLoad attr Str BinOpAdd BoolOpOr BoolOpAnd AttributeLoad NameLoad attr Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return BinOpMod Str AttributeLoad NameLoad attr orelse Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore BinOpMod Str AttributeLoad NameLoad attr orelse Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMult Str IfExp CompareIsNot AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num Num attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr CompareIs NameLoad AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse If BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Slice Num BinOpAdd Num Call NameLoad Num BinOpSub Num Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num BinOpAdd Num Call NameLoad Num BinOpSub Num Call NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameStore NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign NameStore BinOpMod Str TupleLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore NameLoad Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad TupleLoad AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad Dict NameLoad TupleLoad AttributeLoad NameLoad attr Dict Str NameLoad Assign NameStore TupleLoad Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpAnd CompareGt AttributeLoad NameLoad attr TupleLoad Num Num Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num Assign AttributeStore NameLoad attr BoolOpOr CompareLt AttributeLoad NameLoad attr TupleLoad Num Num CompareEq Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Return NameLoad orelse Return NameLoad decorator_list Assign NameStore Call NameLoad ListLoad Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Return ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIsNot NameLoad NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Num Num Num CompareIsNot NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Expr Str Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Str orelse Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore ListComp Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str orelse Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad keyword Dict Str AttributeLoad NameLoad attr Return ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMod Str Call NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore ListComp Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad kwarg body If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad If NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr keyword Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore UnaryOpNot NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Num body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num orelse Assign NameStore TupleLoad Assign NameStore Dict If CompareEq NameLoad Str body If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad orelse Assign NameStore TupleLoad orelse If CompareEq NameLoad Str body Assign NameStore TupleLoad Num orelse If CompareEq NameLoad Str body Assign NameStore TupleLoad orelse If CompareIn NameLoad TupleLoad Str Str body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign NameStore TupleLoad orelse If CompareIn NameLoad TupleLoad Str Str Str body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign NameStore TupleLoad orelse If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign NameStore TupleLoad Call NameLoad NameLoad orelse Assign NameStore TupleLoad orelse If CompareIn NameLoad TupleLoad Str Str Str body If NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Assign NameStore TupleLoad orelse If NameLoad body Assign NameStore TupleLoad Call NameLoad NameLoad While NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Break orelse If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore NameLoad If CompareIn Str NameLoad body Assign TupleStore SubscriptStore NameLoad Index Str SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Break orelse If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Continue orelse Assign NameStore NameLoad Break If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd CompareNotIn Str Call AttributeLoad NameLoad attr Num CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Str Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Str If CompareLt AttributeLoad NameLoad attr TupleLoad Num Num body Assign NameStore BinOpMod Str Call AttributeLoad NameLoad attr Str Str orelse Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return Dict Str Str NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore IfExp CompareEq NameLoad Str NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body If CompareNotEq NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Assign NameStore NameLoad orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareLt AttributeLoad NameLoad attr TupleLoad Num Num body Return BinOpMod Str Call AttributeLoad Str attr GeneratorExp BinOpMod Str TupleLoad NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Num Num orelse Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore BinOpMod Str TupleLoad IfExp CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num Str Str Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad NameLoad Assign NameStore NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad If NameLoad body If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore NameLoad Continue If BoolOpAnd NameLoad UnaryOpNot CompareEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Str ListComp Call NameLoad Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Return ListComp Dict Str Str Str NameLoad SubscriptLoad NameLoad Index Str ListComp SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Str Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return ListComp Dict Str Str NameLoad ListComp SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str If CompareIn NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str attr SubscriptLoad NameLoad Index Str orelse Assign SubscriptStore NameLoad Index NameLoad Dict Str ListLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str attr Num If SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index NameLoad Dict Str Str Str NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Return NameLoad decorator_list decorator_list
N/A N/A 
.. dialect:: postgresql
    :name: PostgreSQL


Sequences/SERIAL
----------------

PostgreSQL supports sequences, and SQLAlchemy uses these as the default means
of creating new primary key values for integer-based primary key columns. When
creating tables, SQLAlchemy will issue the ``SERIAL`` datatype for
integer-based primary key columns, which generates a sequence and server side
default corresponding to the column.

To specify a specific named sequence to be used for primary key generation,
use the :func:`~sqlalchemy.schema.Sequence` construct::

    Table('sometable', metadata,
            Column('id', Integer, Sequence('some_id_seq'), primary_key=True)
        )

When SQLAlchemy issues a single INSERT statement, to fulfill the contract of
having the "last insert identifier" available, a RETURNING clause is added to
the INSERT statement which specifies the primary key columns should be
returned after the statement completes. The RETURNING functionality only takes
place if Postgresql 8.2 or later is in use. As a fallback approach, the
sequence, whether specified explicitly or implicitly via ``SERIAL``, is
executed independently beforehand, the returned value to be used in the
subsequent insert. Note that when an
:func:`~sqlalchemy.sql.expression.insert()` construct is executed using
"executemany" semantics, the "last inserted identifier" functionality does not
apply; no RETURNING clause is emitted nor is the sequence pre-executed in this
case.

To force the usage of RETURNING by default off, specify the flag
``implicit_returning=False`` to :func:`.create_engine`.

.. _postgresql_isolation_level:

Transaction Isolation Level
---------------------------

All Postgresql dialects support setting of transaction isolation level
both via a dialect-specific parameter :paramref:`.create_engine.isolation_level`
accepted by :func:`.create_engine`,
as well as the ``isolation_level`` argument as passed to
:meth:`.Connection.execution_options`.  When using a non-psycopg2 dialect,
this feature works by issuing the command
``SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL <level>`` for
each new connection.

To set isolation level using :func:`.create_engine`::

    engine = create_engine(
        "postgresql+pg8000://scott:tiger@localhost/test",
        isolation_level="READ UNCOMMITTED"
    )

To set using per-connection execution options::

    connection = engine.connect()
    connection = connection.execution_options(
        isolation_level="READ COMMITTED"
    )

Valid values for ``isolation_level`` include:

* ``READ COMMITTED``
* ``READ UNCOMMITTED``
* ``REPEATABLE READ``
* ``SERIALIZABLE``

The :mod:`~sqlalchemy.dialects.postgresql.psycopg2` and
:mod:`~sqlalchemy.dialects.postgresql.pg8000` dialects also offer the
special level ``AUTOCOMMIT``.

.. seealso::

    :ref:`psycopg2_isolation_level`

    :ref:`pg8000_isolation_level`

.. _postgresql_schema_reflection:

Remote-Schema Table Introspection and Postgresql search_path
------------------------------------------------------------

The Postgresql dialect can reflect tables from any schema.  The
:paramref:`.Table.schema` argument, or alternatively the
:paramref:`.MetaData.reflect.schema` argument determines which schema will
be searched for the table or tables.   The reflected :class:`.Table` objects
will in all cases retain this ``.schema`` attribute as was specified.
However, with regards to tables which these :class:`.Table` objects refer to
via foreign key constraint, a decision must be made as to how the ``.schema``
is represented in those remote tables, in the case where that remote
schema name is also a member of the current
`Postgresql search path
<http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_.

By default, the Postgresql dialect mimics the behavior encouraged by
Postgresql's own ``pg_get_constraintdef()`` builtin procedure.  This function
returns a sample definition for a particular foreign key constraint,
omitting the referenced schema name from that definition when the name is
also in the Postgresql schema search path.  The interaction below
illustrates this behavior::

    test=> CREATE TABLE test_schema.referred(id INTEGER PRIMARY KEY);
    CREATE TABLE
    test=> CREATE TABLE referring(
    test(>         id INTEGER PRIMARY KEY,
    test(>         referred_id INTEGER REFERENCES test_schema.referred(id));
    CREATE TABLE
    test=> SET search_path TO public, test_schema;
    test=> SELECT pg_catalog.pg_get_constraintdef(r.oid, true) FROM
    test-> pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n
    test-> ON n.oid = c.relnamespace
    test-> JOIN pg_catalog.pg_constraint r  ON c.oid = r.conrelid
    test-> WHERE c.relname='referring' AND r.contype = 'f'
    test-> ;
                   pg_get_constraintdef
    ---------------------------------------------------
     FOREIGN KEY (referred_id) REFERENCES referred(id)
    (1 row)

Above, we created a table ``referred`` as a member of the remote schema
``test_schema``, however when we added ``test_schema`` to the
PG ``search_path`` and then asked ``pg_get_constraintdef()`` for the
``FOREIGN KEY`` syntax, ``test_schema`` was not included in the output of
the function.

On the other hand, if we set the search path back to the typical default
of ``public``::

    test=> SET search_path TO public;
    SET

The same query against ``pg_get_constraintdef()`` now returns the fully
schema-qualified name for us::

    test=> SELECT pg_catalog.pg_get_constraintdef(r.oid, true) FROM
    test-> pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n
    test-> ON n.oid = c.relnamespace
    test-> JOIN pg_catalog.pg_constraint r  ON c.oid = r.conrelid
    test-> WHERE c.relname='referring' AND r.contype = 'f';
                         pg_get_constraintdef
    ---------------------------------------------------------------
     FOREIGN KEY (referred_id) REFERENCES test_schema.referred(id)
    (1 row)

SQLAlchemy will by default use the return value of ``pg_get_constraintdef()``
in order to determine the remote schema name.  That is, if our ``search_path``
were set to include ``test_schema``, and we invoked a table
reflection process as follows::

    >>> from sqlalchemy import Table, MetaData, create_engine
    >>> engine = create_engine("postgresql://scott:tiger@localhost/test")
    >>> with engine.connect() as conn:
    ...     conn.execute("SET search_path TO test_schema, public")
    ...     meta = MetaData()
    ...     referring = Table('referring', meta,
    ...                       autoload=True, autoload_with=conn)
    ...
    <sqlalchemy.engine.result.ResultProxy object at 0x101612ed0>

The above process would deliver to the :attr:`.MetaData.tables` collection
``referred`` table named **without** the schema::

    >>> meta.tables['referred'].schema is None
    True

To alter the behavior of reflection such that the referred schema is
maintained regardless of the ``search_path`` setting, use the
``postgresql_ignore_search_path`` option, which can be specified as a
dialect-specific argument to both :class:`.Table` as well as
:meth:`.MetaData.reflect`::

    >>> with engine.connect() as conn:
    ...     conn.execute("SET search_path TO test_schema, public")
    ...     meta = MetaData()
    ...     referring = Table('referring', meta, autoload=True,
    ...                       autoload_with=conn,
    ...                       postgresql_ignore_search_path=True)
    ...
    <sqlalchemy.engine.result.ResultProxy object at 0x1016126d0>

We will now have ``test_schema.referred`` stored as schema-qualified::

    >>> meta.tables['test_schema.referred'].schema
    'test_schema'

.. sidebar:: Best Practices for Postgresql Schema reflection

    The description of Postgresql schema reflection behavior is complex, and
    is the product of many years of dealing with widely varied use cases and
    user preferences. But in fact, there's no need to understand any of it if
    you just stick to the simplest use pattern: leave the ``search_path`` set
    to its default of ``public`` only, never refer to the name ``public`` as
    an explicit schema name otherwise, and refer to all other schema names
    explicitly when building up a :class:`.Table` object.  The options
    described here are only for those users who can't, or prefer not to, stay
    within these guidelines.

Note that **in all cases**, the "default" schema is always reflected as
``None``. The "default" schema on Postgresql is that which is returned by the
Postgresql ``current_schema()`` function.  On a typical Postgresql
installation, this is the name ``public``.  So a table that refers to another
which is in the ``public`` (i.e. default) schema will always have the
``.schema`` attribute set to ``None``.

.. versionadded:: 0.9.2 Added the ``postgresql_ignore_search_path``
   dialect-level option accepted by :class:`.Table` and
   :meth:`.MetaData.reflect`.


.. seealso::

        `The Schema Search Path
        <http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_
        - on the Postgresql website.

INSERT/UPDATE...RETURNING
-------------------------

The dialect supports PG 8.2's ``INSERT..RETURNING``, ``UPDATE..RETURNING`` and
``DELETE..RETURNING`` syntaxes.   ``INSERT..RETURNING`` is used by default
for single-row INSERT statements in order to fetch newly generated
primary key identifiers.   To specify an explicit ``RETURNING`` clause,
use the :meth:`._UpdateBase.returning` method on a per-statement basis::

    # INSERT..RETURNING
    result = table.insert().returning(table.c.col1, table.c.col2).\
        values(name='foo')
    print result.fetchall()

    # UPDATE..RETURNING
    result = table.update().returning(table.c.col1, table.c.col2).\
        where(table.c.name=='foo').values(name='bar')
    print result.fetchall()

    # DELETE..RETURNING
    result = table.delete().returning(table.c.col1, table.c.col2).\
        where(table.c.name=='foo')
    print result.fetchall()

.. _postgresql_match:

Full Text Search
----------------

SQLAlchemy makes available the Postgresql ``@@`` operator via the
:meth:`.ColumnElement.match` method on any textual column expression.
On a Postgresql dialect, an expression like the following::

    select([sometable.c.text.match("search string")])

will emit to the database::

    SELECT text @@ to_tsquery('search string') FROM table

The Postgresql text search functions such as ``to_tsquery()``
and ``to_tsvector()`` are available
explicitly using the standard :data:`.func` construct.  For example::

    select([
        func.to_tsvector('fat cats ate rats').match('cat & rat')
    ])

Emits the equivalent of::

    SELECT to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat')

The :class:`.postgresql.TSVECTOR` type can provide for explicit CAST::

    from sqlalchemy.dialects.postgresql import TSVECTOR
    from sqlalchemy import select, cast
    select([cast("some text", TSVECTOR)])

produces a statement equivalent to::

    SELECT CAST('some text' AS TSVECTOR) AS anon_1

Full Text Searches in Postgresql are influenced by a combination of: the
PostgresSQL setting of ``default_text_search_config``, the ``regconfig`` used
to build the GIN/GiST indexes, and the ``regconfig`` optionally passed in
during a query.

When performing a Full Text Search against a column that has a GIN or
GiST index that is already pre-computed (which is common on full text
searches) one may need to explicitly pass in a particular PostgresSQL
``regconfig`` value to ensure the query-planner utilizes the index and does
not re-compute the column on demand.

In order to provide for this explicit query planning, or to use different
search strategies, the ``match`` method accepts a ``postgresql_regconfig``
keyword argument::

    select([mytable.c.id]).where(
        mytable.c.title.match('somestring', postgresql_regconfig='english')
    )

Emits the equivalent of::

    SELECT mytable.id FROM mytable
    WHERE mytable.title @@ to_tsquery('english', 'somestring')

One can also specifically pass in a `'regconfig'` value to the
``to_tsvector()`` command as the initial argument::

    select([mytable.c.id]).where(
            func.to_tsvector('english', mytable.c.title )            .match('somestring', postgresql_regconfig='english')
        )

produces a statement equivalent to::

    SELECT mytable.id FROM mytable
    WHERE to_tsvector('english', mytable.title) @@
        to_tsquery('english', 'somestring')

It is recommended that you use the ``EXPLAIN ANALYZE...`` tool from
PostgresSQL to ensure that you are generating queries with SQLAlchemy that
take full advantage of any indexes you may have created for full text search.

FROM ONLY ...
------------------------

The dialect supports PostgreSQL's ONLY keyword for targeting only a particular
table in an inheritance hierarchy. This can be used to produce the
``SELECT ... FROM ONLY``, ``UPDATE ONLY ...``, and ``DELETE FROM ONLY ...``
syntaxes. It uses SQLAlchemy's hints mechanism::

    # SELECT ... FROM ONLY ...
    result = table.select().with_hint(table, 'ONLY', 'postgresql')
    print result.fetchall()

    # UPDATE ONLY ...
    table.update(values=dict(foo='bar')).with_hint('ONLY',
                                                   dialect_name='postgresql')

    # DELETE FROM ONLY ...
    table.delete().with_hint('ONLY', dialect_name='postgresql')

.. _postgresql_indexes:

Postgresql-Specific Index Options
---------------------------------

Several extensions to the :class:`.Index` construct are available, specific
to the PostgreSQL dialect.

Partial Indexes
^^^^^^^^^^^^^^^^

Partial indexes add criterion to the index definition so that the index is
applied to a subset of rows.   These can be specified on :class:`.Index`
using the ``postgresql_where`` keyword argument::

  Index('my_index', my_table.c.id, postgresql_where=tbl.c.value > 10)

Operator Classes
^^^^^^^^^^^^^^^^^

PostgreSQL allows the specification of an *operator class* for each column of
an index (see
http://www.postgresql.org/docs/8.3/interactive/indexes-opclass.html).
The :class:`.Index` construct allows these to be specified via the
``postgresql_ops`` keyword argument::

    Index('my_index', my_table.c.id, my_table.c.data,
                            postgresql_ops={
                                'data': 'text_pattern_ops',
                                'id': 'int4_ops'
                            })

.. versionadded:: 0.7.2
    ``postgresql_ops`` keyword argument to :class:`.Index` construct.

Note that the keys in the ``postgresql_ops`` dictionary are the "key" name of
the :class:`.Column`, i.e. the name used to access it from the ``.c``
collection of :class:`.Table`, which can be configured to be different than
the actual name of the column as expressed in the database.

Index Types
^^^^^^^^^^^^

PostgreSQL provides several index types: B-Tree, Hash, GiST, and GIN, as well
as the ability for users to create their own (see
http://www.postgresql.org/docs/8.3/static/indexes-types.html). These can be
specified on :class:`.Index` using the ``postgresql_using`` keyword argument::

    Index('my_index', my_table.c.data, postgresql_using='gin')

The value passed to the keyword argument will be simply passed through to the
underlying CREATE INDEX command, so it *must* be a valid index type for your
version of PostgreSQL.


.. _postgresql_index_concurrently:

Indexes with CONCURRENTLY
^^^^^^^^^^^^^^^^^^^^^^^^^

The Postgresql index option CONCURRENTLY is supported by passing the
flag ``postgresql_concurrently`` to the :class:`.Index` construct::

    tbl = Table('testtbl', m, Column('data', Integer))

    idx1 = Index('test_idx1', tbl.c.data, postgresql_concurrently=True)

The above index construct will render SQL as::

    CREATE INDEX CONCURRENTLY test_idx1 ON testtbl (data)

.. versionadded:: 0.9.9

 collections defaultdict N/A re N/A sql schema exc util engine default reflection sql compiler expression operators N/A types sqltypes N/A N/A uuid UUID _python_UUID N/A N/A N/A ImportError N/A N/A _python_UUID None sqlalchemy.types INTEGER BIGINT SMALLINT VARCHAR CHAR TEXT FLOAT NUMERIC DATE BOOLEAN REAL N/A RESERVED_WORDS N/A set N/A all analyse analyze and any array as asc asymmetric both case cast check collate column constraint create current_catalog current_date current_role current_time current_timestamp current_user default deferrable desc distinct do else end except false fetch for foreign from grant group having in initially intersect into leading limit localtime localtimestamp new not null of off offset old on only or order placing primary references returning select session_user some symmetric table then to trailing true union unique user using variadic when where window with authorization between binary cross current_schema freeze full ilike inner is isnull join left like natural notnull outer over overlaps right similar verbose N/A _DECIMAL_TYPES N/A 1231 1700 N/A _FLOAT_TYPES N/A 700 701 1021 1022 N/A _INT_TYPES N/A 20 21 23 26 1005 1007 1016 BYTEA N/A N/A sqltypes LargeBinary N/A N/A __visit_name__ BYTEA N/A DOUBLE_PRECISION N/A N/A sqltypes Float N/A N/A __visit_name__ DOUBLE_PRECISION N/A INET N/A N/A sqltypes TypeEngine N/A N/A __visit_name__ INET N/A N/A PGInet INET CIDR N/A N/A sqltypes TypeEngine N/A N/A __visit_name__ CIDR N/A N/A PGCidr CIDR MACADDR N/A N/A sqltypes TypeEngine N/A N/A __visit_name__ MACADDR N/A N/A PGMacAddr MACADDR OID N/A N/A sqltypes TypeEngine N/A N/A Provide the Postgresql OID type.

    .. versionadded:: 0.9.5

     N/A __visit_name__ OID N/A TIMESTAMP N/A N/A sqltypes TIMESTAMP N/A __init__ N/A N/A self timezone precision N/A False None N/A N/A N/A N/A N/A super TIMESTAMP self __init__ timezone timezone N/A N/A self precision precision N/A N/A TIME N/A N/A sqltypes TIME N/A __init__ N/A N/A self timezone precision N/A False None N/A N/A N/A N/A N/A super TIME self __init__ timezone timezone N/A N/A self precision precision N/A N/A INTERVAL N/A N/A sqltypes TypeEngine N/A N/A Postgresql INTERVAL type.

    The INTERVAL type may not be supported on all DBAPIs.
    It is known to work on psycopg2 and not pg8000 or zxjdbc.

     N/A __visit_name__ INTERVAL __init__ N/A N/A self precision N/A None N/A N/A N/A self precision precision N/A _adapt_from_generic_interval N/A N/A cls interval N/A N/A N/A N/A INTERVAL precision N/A interval second_precision N/A classmethod _type_affinity N/A N/A self N/A N/A N/A N/A sqltypes Interval N/A property N/A N/A PGInterval INTERVAL BIT N/A N/A sqltypes TypeEngine N/A N/A __visit_name__ BIT __init__ N/A N/A self length varying N/A None False N/A N/A N/A varying N/A N/A N/A self length N/A length 1 N/A N/A N/A self length length N/A N/A self varying varying N/A N/A N/A PGBit BIT UUID N/A N/A sqltypes TypeEngine N/A N/A Postgresql UUID type.

    Represents the UUID column type, interpreting
    data either as natively returned by the DBAPI
    or as Python uuid objects.

    The UUID type may not be supported on all DBAPIs.
    It is known to work on psycopg2 and not pg8000.

     N/A __visit_name__ UUID __init__ N/A N/A self as_uuid N/A False N/A N/A Construct a UUID type.


        :param as_uuid=False: if True, values will be interpreted
         as Python uuid objects, converting to/from string via the
         DBAPI.

          N/A N/A as_uuid N/A _python_UUID None N/A N/A N/A NotImplementedError This version of Python does not support the native UUID type. N/A N/A self as_uuid as_uuid N/A bind_processor N/A N/A self dialect N/A N/A N/A N/A self as_uuid N/A process N/A N/A value N/A N/A N/A N/A value None N/A N/A value N/A N/A util text_type value N/A value N/A N/A process N/A N/A None N/A result_processor N/A N/A self dialect coltype N/A N/A N/A N/A self as_uuid N/A process N/A N/A value N/A N/A N/A N/A value None N/A N/A value N/A _python_UUID value N/A value N/A N/A process N/A N/A None N/A N/A N/A PGUuid UUID TSVECTOR N/A N/A sqltypes TypeEngine N/A N/A The :class:`.postgresql.TSVECTOR` type implements the Postgresql
    text search type TSVECTOR.

    It can be used to do full text queries on natural language
    documents.

    .. versionadded:: 0.9.0

    .. seealso::

        :ref:`postgresql_match`

     N/A __visit_name__ TSVECTOR N/A _Slice N/A N/A expression ColumnElement N/A N/A __visit_name__ slice N/A type N/A sqltypes NULLTYPE __init__ N/A N/A self slice_ source_comparator N/A N/A N/A N/A self start N/A N/A source_comparator _check_literal N/A source_comparator expr N/A operators getitem N/A slice_ start N/A N/A self stop N/A N/A source_comparator _check_literal N/A source_comparator expr N/A operators getitem N/A slice_ stop N/A N/A Any N/A N/A expression ColumnElement N/A N/A Represent the clause ``left operator ANY (right)``.  ``right`` must be
    an array expression.

    .. seealso::

        :class:`.postgresql.ARRAY`

        :meth:`.postgresql.ARRAY.Comparator.any` - ARRAY-bound method

     N/A __visit_name__ any __init__ N/A N/A self left right operator N/A N/A operators eq N/A N/A N/A self type N/A N/A sqltypes Boolean N/A N/A self left N/A N/A expression _literal_as_binds left N/A N/A self right right N/A N/A self operator operator N/A N/A All N/A N/A expression ColumnElement N/A N/A Represent the clause ``left operator ALL (right)``.  ``right`` must be
    an array expression.

    .. seealso::

        :class:`.postgresql.ARRAY`

        :meth:`.postgresql.ARRAY.Comparator.all` - ARRAY-bound method

     N/A __visit_name__ all __init__ N/A N/A self left right operator N/A N/A operators eq N/A N/A N/A self type N/A N/A sqltypes Boolean N/A N/A self left N/A N/A expression _literal_as_binds left N/A N/A self right right N/A N/A self operator operator N/A N/A array N/A N/A expression Tuple N/A N/A A Postgresql ARRAY literal.

    This is used to produce ARRAY literals in SQL expressions, e.g.::

        from sqlalchemy.dialects.postgresql import array
        from sqlalchemy.dialects import postgresql
        from sqlalchemy import select, func

        stmt = select([
                        array([1,2]) + array([3,4,5])
                    ])

        print stmt.compile(dialect=postgresql.dialect())

    Produces the SQL::

        SELECT ARRAY[%(param_1)s, %(param_2)s] ||
            ARRAY[%(param_3)s, %(param_4)s, %(param_5)s]) AS anon_1

    An instance of :class:`.array` will always have the datatype
    :class:`.ARRAY`.  The "inner" type of the array is inferred from
    the values present, unless the ``type_`` keyword argument is passed::

        array(['foo', 'bar'], type_=CHAR)

    .. versionadded:: 0.8 Added the :class:`~.postgresql.array` literal type.

    See also:

    :class:`.postgresql.ARRAY`

     N/A __visit_name__ array __init__ N/A N/A self clauses N/A kw N/A N/A N/A N/A N/A super array self __init__ clauses kw N/A N/A self type N/A ARRAY N/A self type N/A _bind_param N/A N/A self operator obj N/A N/A N/A N/A array N/A N/A N/A expression BindParameter None o _compared_to_operator operator _compared_to_type N/A self type unique True N/A o obj N/A self_group N/A N/A self against N/A None N/A N/A self N/A N/A ARRAY N/A N/A sqltypes Concatenable N/A sqltypes TypeEngine N/A N/A Postgresql ARRAY type.

    Represents values as Python lists.

    An :class:`.ARRAY` type is constructed given the "type"
    of element::

        mytable = Table("mytable", metadata,
                Column("data", ARRAY(Integer))
            )

    The above type represents an N-dimensional array,
    meaning Postgresql will interpret values with any number
    of dimensions automatically.   To produce an INSERT
    construct that passes in a 1-dimensional array of integers::

        connection.execute(
                mytable.insert(),
                data=[1,2,3]
        )

    The :class:`.ARRAY` type can be constructed given a fixed number
    of dimensions::

        mytable = Table("mytable", metadata,
                Column("data", ARRAY(Integer, dimensions=2))
            )

    This has the effect of the :class:`.ARRAY` type
    specifying that number of bracketed blocks when a :class:`.Table`
    is used in a CREATE TABLE statement, or when the type is used
    within a :func:`.expression.cast` construct; it also causes
    the bind parameter and result set processing of the type
    to optimize itself to expect exactly that number of dimensions.
    Note that Postgresql itself still allows N dimensions with such a type.

    SQL expressions of type :class:`.ARRAY` have support for "index" and
    "slice" behavior.  The Python ``[]`` operator works normally here, given
    integer indexes or slices.  Note that Postgresql arrays default
    to 1-based indexing.  The operator produces binary expression
    constructs which will produce the appropriate SQL, both for
    SELECT statements::

        select([mytable.c.data[5], mytable.c.data[2:7]])

    as well as UPDATE statements when the :meth:`.Update.values` method
    is used::

        mytable.update().values({
            mytable.c.data[5]: 7,
            mytable.c.data[2:7]: [1, 2, 3]
        })

    :class:`.ARRAY` provides special methods for containment operations,
    e.g.::

        mytable.c.data.contains([1, 2])

    For a full list of special methods see :class:`.ARRAY.Comparator`.

    .. versionadded:: 0.8 Added support for index and slice operations
       to the :class:`.ARRAY` type, including support for UPDATE
       statements, and special array containment operations.

    The :class:`.ARRAY` type may not be supported on all DBAPIs.
    It is known to work on psycopg2 and not pg8000.

    See also:

    :class:`.postgresql.array` - produce a literal array value.

     N/A __visit_name__ ARRAY Comparator N/A N/A N/A sqltypes Concatenable Comparator N/A N/A Define comparison operations for :class:`.ARRAY`. __getitem__ N/A N/A self index N/A N/A N/A shift_indexes N/A N/A N/A N/A self expr type zero_indexes 1 0 N/A N/A isinstance index slice N/A N/A shift_indexes N/A N/A index N/A slice N/A N/A index start shift_indexes N/A N/A index stop shift_indexes N/A index step N/A index N/A _Slice index self N/A return_type N/A self type N/A N/A index shift_indexes N/A return_type N/A N/A self type item_type N/A N/A N/A self _binary_operate N/A self expr N/A operators getitem index result_type return_type N/A any N/A N/A self other operator N/A N/A operators eq N/A N/A Return ``other operator ANY (array)`` clause.

            Argument places are switched, because ANY requires array
            expression to be on the right hand-side.

            E.g.::

                from sqlalchemy.sql import operators

                conn.execute(
                    select([table.c.data]).where(
                            table.c.data.any(7, operator=operators.lt)
                        )
                )

            :param other: expression to be compared
            :param operator: an operator object from the
             :mod:`sqlalchemy.sql.operators`
             package, defaults to :func:`.operators.eq`.

            .. seealso::

                :class:`.postgresql.Any`

                :meth:`.postgresql.ARRAY.Comparator.all`

             N/A N/A Any other N/A self expr operator operator N/A all N/A N/A self other operator N/A N/A operators eq N/A N/A Return ``other operator ALL (array)`` clause.

            Argument places are switched, because ALL requires array
            expression to be on the right hand-side.

            E.g.::

                from sqlalchemy.sql import operators

                conn.execute(
                    select([table.c.data]).where(
                            table.c.data.all(7, operator=operators.lt)
                        )
                )

            :param other: expression to be compared
            :param operator: an operator object from the
             :mod:`sqlalchemy.sql.operators`
             package, defaults to :func:`.operators.eq`.

            .. seealso::

                :class:`.postgresql.All`

                :meth:`.postgresql.ARRAY.Comparator.any`

             N/A N/A All other N/A self expr operator operator N/A contains N/A N/A self other N/A kwargs N/A N/A Boolean expression.  Test if elements are a superset of the
            elements of the argument array expression.
             N/A N/A N/A N/A N/A self expr op @> other N/A contained_by N/A N/A self other N/A N/A N/A Boolean expression.  Test if elements are a proper subset of the
            elements of the argument array expression.
             N/A N/A N/A N/A N/A self expr op <@ other N/A overlap N/A N/A self other N/A N/A N/A Boolean expression.  Test if array has elements in common with
            an argument array expression.
             N/A N/A N/A N/A N/A self expr op && other N/A _adapt_expression N/A N/A self op other_comparator N/A N/A N/A N/A isinstance op N/A operators custom_op N/A N/A N/A N/A op opstring N/A @> <@ && N/A N/A N/A op N/A sqltypes Boolean N/A N/A N/A N/A N/A sqltypes Concatenable Comparator _adapt_expression self op other_comparator N/A N/A N/A comparator_factory Comparator __init__ N/A N/A self item_type as_tuple dimensions zero_indexes N/A False None False N/A N/A Construct an ARRAY.

        E.g.::

          Column('myarray', ARRAY(Integer))

        Arguments are:

        :param item_type: The data type of items of this array. Note that
          dimensionality is irrelevant here, so multi-dimensional arrays like
          ``INTEGER[][]``, are constructed as ``ARRAY(Integer)``, not as
          ``ARRAY(ARRAY(Integer))`` or such.

        :param as_tuple=False: Specify whether return results
          should be converted to tuples from lists. DBAPIs such
          as psycopg2 return lists by default. When tuples are
          returned, the results are hashable.

        :param dimensions: if non-None, the ARRAY will assume a fixed
         number of dimensions.  This will cause the DDL emitted for this
         ARRAY to include the exact number of bracket clauses ``[]``,
         and will also optimize the performance of the type overall.
         Note that PG arrays are always implicitly "non-dimensioned",
         meaning they can store any number of dimensions no matter how
         they were declared.

        :param zero_indexes=False: when True, index values will be converted
         between Python zero-based and Postgresql one-based indexes, e.g.
         a value of one will be added to all index values before passing
         to the database.

         .. versionadded:: 0.9.5

         N/A N/A isinstance item_type ARRAY N/A N/A N/A ValueError Do not nest ARRAY types; ARRAY(basetype) handles multi-dimensional arrays of basetype N/A N/A isinstance item_type type N/A N/A item_type N/A item_type N/A N/A self item_type item_type N/A N/A self as_tuple as_tuple N/A N/A self dimensions dimensions N/A N/A self zero_indexes zero_indexes N/A python_type N/A N/A self N/A N/A N/A list N/A property compare_values N/A N/A self x y N/A N/A N/A N/A x y N/A _proc_array N/A N/A self arr itemproc dim collection N/A N/A N/A N/A dim None N/A N/A arr N/A list arr N/A N/A N/A dim 1 N/A N/A dim None N/A N/A arr N/A N/A isinstance N/A arr N/A 0 N/A list tuple N/A N/A itemproc N/A N/A N/A collection N/A N/A itemproc x N/A x arr N/A N/A N/A collection arr N/A N/A N/A collection N/A N/A N/A self _proc_array x itemproc N/A N/A dim None N/A dim 1 None collection N/A x arr N/A bind_processor N/A N/A self dialect N/A N/A N/A item_proc N/A N/A N/A N/A N/A self item_type dialect_impl dialect bind_processor dialect process N/A N/A value N/A N/A N/A N/A value None N/A N/A value N/A N/A N/A N/A self _proc_array value item_proc N/A self dimensions list N/A N/A process N/A result_processor N/A N/A self dialect coltype N/A N/A N/A item_proc N/A N/A N/A N/A N/A self item_type dialect_impl dialect result_processor dialect coltype process N/A N/A value N/A N/A N/A N/A value None N/A N/A value N/A N/A N/A N/A self _proc_array value item_proc N/A self dimensions N/A N/A self as_tuple tuple list N/A N/A process N/A N/A N/A PGArray ARRAY ENUM N/A N/A sqltypes Enum N/A N/A Postgresql ENUM type.

    This is a subclass of :class:`.types.Enum` which includes
    support for PG's ``CREATE TYPE``.

    :class:`~.postgresql.ENUM` is used automatically when
    using the :class:`.types.Enum` type on PG assuming
    the ``native_enum`` is left as ``True``.   However, the
    :class:`~.postgresql.ENUM` class can also be instantiated
    directly in order to access some additional Postgresql-specific
    options, namely finer control over whether or not
    ``CREATE TYPE`` should be emitted.

    Note that both :class:`.types.Enum` as well as
    :class:`~.postgresql.ENUM` feature create/drop
    methods; the base :class:`.types.Enum` type ultimately
    delegates to the :meth:`~.postgresql.ENUM.create` and
    :meth:`~.postgresql.ENUM.drop` methods present here.

     __init__ N/A N/A self N/A enums kw N/A N/A Construct an :class:`~.postgresql.ENUM`.

        Arguments are the same as that of
        :class:`.types.Enum`, but also including
        the following parameters.

        :param create_type: Defaults to True.
         Indicates that ``CREATE TYPE`` should be
         emitted, after optionally checking for the
         presence of the type, when the parent
         table is being created; and additionally
         that ``DROP TYPE`` is called when the table
         is dropped.    When ``False``, no check
         will be performed and no ``CREATE TYPE``
         or ``DROP TYPE`` is emitted, unless
         :meth:`~.postgresql.ENUM.create`
         or :meth:`~.postgresql.ENUM.drop`
         are called directly.
         Setting to ``False`` is helpful
         when invoking a creation scheme to a SQL file
         without access to the actual database -
         the :meth:`~.postgresql.ENUM.create` and
         :meth:`~.postgresql.ENUM.drop` methods can
         be used to emit SQL to a target bind.

         .. versionadded:: 0.7.4

         N/A N/A self create_type N/A N/A kw pop create_type True N/A N/A N/A N/A super ENUM self __init__ enums kw N/A create N/A N/A self bind checkfirst N/A None True N/A N/A Emit ``CREATE TYPE`` for this
        :class:`~.postgresql.ENUM`.

        If the underlying dialect does not support
        Postgresql CREATE TYPE, no action is taken.

        :param bind: a connectable :class:`.Engine`,
         :class:`.Connection`, or similar object to emit
         SQL.
        :param checkfirst: if ``True``, a query against
         the PG catalog will be first performed to see
         if the type does not exist already before
         creating.

         N/A N/A N/A N/A bind dialect supports_native_enum N/A N/A N/A N/A N/A checkfirst N/A N/A N/A N/A bind dialect has_type bind N/A self name schema N/A self schema N/A N/A N/A N/A bind execute N/A CreateEnumType self N/A drop N/A N/A self bind checkfirst N/A None True N/A N/A Emit ``DROP TYPE`` for this
        :class:`~.postgresql.ENUM`.

        If the underlying dialect does not support
        Postgresql DROP TYPE, no action is taken.

        :param bind: a connectable :class:`.Engine`,
         :class:`.Connection`, or similar object to emit
         SQL.
        :param checkfirst: if ``True``, a query against
         the PG catalog will be first performed to see
         if the type actually exists before dropping.

         N/A N/A N/A N/A bind dialect supports_native_enum N/A N/A N/A N/A N/A checkfirst N/A N/A N/A bind dialect has_type bind N/A self name schema N/A self schema N/A N/A N/A N/A bind execute N/A DropEnumType self N/A _check_for_name_in_memos N/A N/A self checkfirst kw N/A N/A N/A Look in the 'ddl runner' for 'memos', then
        note our name in that collection.

        This to ensure a particular named enum is operated
        upon only once within any kind of create/drop
        sequence without relying upon "checkfirst".

         N/A N/A N/A self create_type N/A N/A True N/A N/A _ddl_runner kw N/A N/A ddl_runner N/A kw N/A _ddl_runner N/A N/A _pg_enums N/A ddl_runner memo N/A N/A pg_enums N/A N/A ddl_runner memo N/A _pg_enums N/A N/A pg_enums N/A N/A ddl_runner memo N/A _pg_enums N/A set N/A present N/A N/A self name pg_enums N/A N/A N/A pg_enums add N/A self name N/A present N/A N/A False N/A _on_table_create N/A N/A self target bind checkfirst N/A kw N/A N/A N/A N/A N/A self _check_for_name_in_memos checkfirst kw N/A N/A N/A N/A self create bind bind checkfirst checkfirst N/A _on_metadata_create N/A N/A self target bind checkfirst N/A kw N/A N/A N/A N/A N/A self _check_for_name_in_memos checkfirst kw N/A N/A N/A N/A self create bind bind checkfirst checkfirst N/A _on_metadata_drop N/A N/A self target bind checkfirst N/A kw N/A N/A N/A N/A N/A self _check_for_name_in_memos checkfirst kw N/A N/A N/A N/A self drop bind bind checkfirst checkfirst N/A N/A N/A colspecs N/A N/A sqltypes Interval N/A sqltypes Enum INTERVAL ENUM N/A ischema_names N/A integer bigint smallint character varying character "char" name text numeric float real inet cidr uuid bit bit varying macaddr oid double precision timestamp timestamp with time zone timestamp without time zone time with time zone time without time zone date time bytea boolean interval interval year to month interval day to second tsvector INTEGER BIGINT SMALLINT VARCHAR CHAR N/A sqltypes String N/A sqltypes String TEXT NUMERIC FLOAT REAL INET CIDR UUID BIT BIT MACADDR OID DOUBLE_PRECISION TIMESTAMP TIMESTAMP TIMESTAMP TIME TIME DATE TIME BYTEA BOOLEAN INTERVAL INTERVAL INTERVAL TSVECTOR PGCompiler N/A N/A compiler SQLCompiler N/A visit_array N/A N/A self element N/A kw N/A N/A N/A ARRAY[%s] N/A N/A self visit_clauselist element kw N/A visit_slice N/A N/A self element N/A kw N/A N/A N/A %s:%s N/A N/A N/A self process N/A element start kw N/A N/A self process N/A element stop kw N/A visit_any N/A N/A self element N/A kw N/A N/A N/A %s%sANY (%s) N/A N/A N/A self process N/A element left kw N/A N/A compiler OPERATORS N/A N/A element operator N/A N/A self process N/A element right kw N/A visit_all N/A N/A self element N/A kw N/A N/A N/A %s%sALL (%s) N/A N/A N/A self process N/A element left kw N/A N/A compiler OPERATORS N/A N/A element operator N/A N/A self process N/A element right kw N/A visit_getitem_binary N/A N/A self binary operator N/A kw N/A N/A N/A %s[%s] N/A N/A N/A self process N/A binary left kw N/A N/A self process N/A binary right kw N/A visit_match_op_binary N/A N/A self binary operator N/A kw N/A N/A N/A postgresql_regconfig N/A binary modifiers N/A N/A regconfig N/A N/A self render_literal_value N/A N/A binary modifiers N/A postgresql_regconfig N/A sqltypes STRINGTYPE N/A regconfig N/A N/A N/A %s @@ to_tsquery(%s, %s) N/A N/A N/A self process N/A binary left kw regconfig N/A N/A self process N/A binary right kw N/A N/A %s @@ to_tsquery(%s) N/A N/A N/A self process N/A binary left kw N/A N/A self process N/A binary right kw N/A visit_ilike_op_binary N/A N/A self binary operator N/A kw N/A N/A escape N/A N/A N/A binary modifiers get escape None N/A N/A N/A %s ILIKE %s N/A N/A N/A self process N/A binary left kw N/A N/A self process N/A binary right kw N/A escape N/A  ESCAPE  N/A N/A self render_literal_value escape N/A sqltypes STRINGTYPE N/A visit_notilike_op_binary N/A N/A self binary operator N/A kw N/A N/A escape N/A N/A N/A binary modifiers get escape None N/A N/A N/A %s NOT ILIKE %s N/A N/A N/A self process N/A binary left kw N/A N/A self process N/A binary right kw N/A escape N/A  ESCAPE  N/A N/A self render_literal_value escape N/A sqltypes STRINGTYPE N/A render_literal_value N/A N/A self value type_ N/A N/A N/A value N/A N/A N/A super PGCompiler self render_literal_value value type_ N/A N/A N/A self dialect _backslash_escapes N/A N/A value N/A N/A value replace \ \\ N/A value N/A visit_sequence N/A N/A self seq N/A N/A N/A N/A nextval('%s') N/A N/A N/A self preparer format_sequence seq N/A limit_clause N/A N/A self select N/A N/A N/A text N/A N/A N/A select _limit None N/A N/A text N/A  
 LIMIT  N/A N/A self process N/A N/A sql literal N/A select _limit N/A N/A N/A select _offset None N/A N/A N/A N/A select _limit None N/A N/A text  
 LIMIT ALL N/A text N/A  OFFSET  N/A N/A self process N/A N/A sql literal N/A select _offset N/A text N/A format_from_hint_text N/A N/A self sqltext table hint iscrud N/A N/A N/A N/A N/A N/A hint upper ONLY N/A N/A N/A N/A exc CompileError N/A Unrecognized hint: %r hint N/A N/A ONLY  sqltext N/A get_select_precolumns N/A N/A self select N/A N/A N/A N/A N/A select _distinct False N/A N/A N/A N/A select _distinct True N/A N/A DISTINCT  N/A N/A N/A isinstance N/A select _distinct N/A list tuple N/A N/A N/A N/A DISTINCT ON ( N/A N/A ,  join N/A N/A N/A self process col N/A col N/A select _distinct )  N/A N/A N/A N/A DISTINCT ON ( N/A N/A self process N/A select _distinct )  N/A N/A N/A for_update_clause N/A N/A self select N/A N/A N/A N/A N/A select _for_update_arg read N/A N/A tmp  FOR SHARE N/A N/A tmp  FOR UPDATE N/A N/A N/A select _for_update_arg of N/A N/A tables N/A N/A util OrderedSet N/A N/A N/A isinstance c N/A expression ColumnClause N/A c table c N/A c N/A N/A select _for_update_arg of N/A tmp N/A  OF  N/A N/A ,  join N/A N/A N/A self process table ashint True N/A table tables N/A N/A N/A select _for_update_arg nowait N/A N/A tmp  NOWAIT N/A tmp N/A returning_clause N/A N/A self stmt returning_cols N/A N/A N/A columns N/A N/A N/A self _label_select_column None c True False N/A N/A c N/A N/A expression _select_iterables returning_cols N/A N/A RETURNING  N/A N/A ,  join columns N/A visit_substring_func N/A N/A self func N/A kw N/A N/A s N/A N/A self process N/A N/A N/A func clauses clauses N/A 0 kw N/A start N/A N/A self process N/A N/A N/A func clauses clauses N/A 1 kw N/A N/A N/A len N/A N/A func clauses clauses 2 N/A N/A length N/A N/A self process N/A N/A N/A func clauses clauses N/A 2 kw N/A N/A SUBSTRING(%s FROM %s FOR %s) N/A s start length N/A N/A N/A SUBSTRING(%s FROM %s) N/A s start N/A N/A PGDDLCompiler N/A N/A compiler DDLCompiler N/A get_column_specification N/A N/A self column N/A kwargs N/A N/A colspec N/A N/A N/A self preparer format_column column N/A impl_type N/A N/A N/A column type dialect_impl N/A self dialect N/A N/A N/A column primary_key N/A column N/A N/A column table _autoincrement_column N/A N/A N/A self dialect supports_smallserial N/A N/A isinstance impl_type N/A sqltypes SmallInteger N/A N/A N/A column default None N/A N/A isinstance N/A column default N/A schema Sequence N/A N/A column default optional N/A N/A N/A isinstance impl_type N/A sqltypes BigInteger N/A N/A colspec  BIGSERIAL N/A N/A N/A isinstance impl_type N/A sqltypes SmallInteger N/A N/A colspec  SMALLSERIAL N/A N/A colspec  SERIAL N/A N/A colspec N/A N/A N/A N/A N/A self dialect type_compiler process N/A column type N/A default N/A N/A self get_column_default_string column N/A N/A default None N/A N/A colspec N/A  DEFAULT  default N/A N/A N/A column nullable N/A N/A colspec  NOT NULL N/A colspec N/A visit_create_enum_type N/A N/A self create N/A N/A N/A type_ N/A create element N/A N/A CREATE TYPE %s AS ENUM (%s) N/A N/A N/A N/A self preparer format_type type_ N/A N/A ,  join N/A N/A N/A N/A self sql_compiler process N/A N/A sql literal e literal_binds True N/A e N/A type_ enums N/A visit_drop_enum_type N/A N/A self drop N/A N/A N/A type_ N/A drop element N/A N/A DROP TYPE %s N/A N/A N/A self preparer format_type type_ N/A visit_create_index N/A N/A self create N/A N/A N/A preparer N/A self preparer N/A index N/A create element N/A N/A N/A self _verify_index_table index N/A text CREATE  N/A N/A index unique N/A N/A text UNIQUE  N/A text INDEX  N/A concurrently N/A N/A N/A index dialect_options N/A postgresql N/A concurrently N/A concurrently N/A N/A text CONCURRENTLY  N/A text N/A %s ON %s  N/A N/A N/A self _prepared_index_name index include_schema False N/A N/A preparer format_table N/A index table N/A using N/A N/A N/A index dialect_options N/A postgresql N/A using N/A using N/A N/A text N/A USING %s  N/A N/A preparer quote using N/A ops N/A N/A N/A index dialect_options N/A postgresql N/A ops N/A text N/A (%s) N/A N/A ,  join N/A N/A N/A N/A N/A self sql_compiler process N/A N/A N/A isinstance expr N/A expression ColumnClause N/A N/A expr self_group expr include_table False literal_binds True N/A N/A N/A hasattr expr key N/A N/A expr key ops N/A N/A ops N/A N/A expr key N/A expr N/A index expressions N/A whereclause N/A N/A N/A index dialect_options N/A postgresql N/A where N/A N/A whereclause None N/A N/A where_compiled N/A N/A N/A self sql_compiler process whereclause include_table False literal_binds True N/A text N/A  WHERE  where_compiled N/A text N/A visit_exclude_constraint N/A N/A self constraint N/A N/A N/A text N/A N/A N/A constraint name None N/A N/A text N/A CONSTRAINT %s  N/A N/A N/A self preparer format_constraint constraint N/A elements N/A N/A c N/A constraint columns N/A N/A op N/A N/A constraint operators N/A N/A c name N/A N/A N/A elements append N/A N/A N/A N/A N/A self preparer quote N/A c name  WITH  op N/A text N/A EXCLUDE USING %s (%s) N/A N/A constraint using N/A N/A ,  join elements N/A N/A N/A constraint where None N/A N/A text N/A  WHERE (%s) N/A N/A N/A self sql_compiler process N/A constraint where literal_binds True N/A text N/A N/A self define_constraint_deferrability constraint N/A text N/A N/A PGTypeCompiler N/A N/A compiler GenericTypeCompiler N/A visit_TSVECTOR N/A N/A self type N/A N/A N/A TSVECTOR N/A visit_INET N/A N/A self type_ N/A N/A N/A INET N/A visit_CIDR N/A N/A self type_ N/A N/A N/A CIDR N/A visit_MACADDR N/A N/A self type_ N/A N/A N/A MACADDR N/A visit_OID N/A N/A self type_ N/A N/A N/A OID N/A visit_FLOAT N/A N/A self type_ N/A N/A N/A N/A N/A type_ precision N/A N/A FLOAT N/A N/A N/A FLOAT(%(precision)s) N/A precision N/A type_ precision N/A visit_DOUBLE_PRECISION N/A N/A self type_ N/A N/A N/A DOUBLE PRECISION N/A visit_BIGINT N/A N/A self type_ N/A N/A N/A BIGINT N/A visit_HSTORE N/A N/A self type_ N/A N/A N/A HSTORE N/A visit_JSON N/A N/A self type_ N/A N/A N/A JSON N/A visit_JSONB N/A N/A self type_ N/A N/A N/A JSONB N/A visit_INT4RANGE N/A N/A self type_ N/A N/A N/A INT4RANGE N/A visit_INT8RANGE N/A N/A self type_ N/A N/A N/A INT8RANGE N/A visit_NUMRANGE N/A N/A self type_ N/A N/A N/A NUMRANGE N/A visit_DATERANGE N/A N/A self type_ N/A N/A N/A DATERANGE N/A visit_TSRANGE N/A N/A self type_ N/A N/A N/A TSRANGE N/A visit_TSTZRANGE N/A N/A self type_ N/A N/A N/A TSTZRANGE N/A visit_datetime N/A N/A self type_ N/A N/A N/A N/A N/A self visit_TIMESTAMP type_ N/A visit_enum N/A N/A self type_ N/A N/A N/A N/A N/A N/A type_ native_enum N/A N/A N/A self dialect supports_native_enum N/A N/A N/A N/A N/A super PGTypeCompiler self visit_enum type_ N/A N/A N/A N/A self visit_ENUM type_ N/A visit_ENUM N/A N/A self type_ N/A N/A N/A N/A N/A N/A N/A self dialect identifier_preparer format_type type_ N/A visit_TIMESTAMP N/A N/A self type_ N/A N/A N/A N/A TIMESTAMP%s %s N/A N/A N/A N/A getattr type_ precision None N/A (%d) N/A type_ precision N/A N/A N/A N/A type_ timezone WITH WITHOUT  TIME ZONE N/A visit_TIME N/A N/A self type_ N/A N/A N/A N/A TIME%s %s N/A N/A N/A N/A getattr type_ precision None N/A (%d) N/A type_ precision N/A N/A N/A N/A type_ timezone WITH WITHOUT  TIME ZONE N/A visit_INTERVAL N/A N/A self type_ N/A N/A N/A N/A N/A type_ precision None N/A N/A N/A INTERVAL(%d) N/A type_ precision N/A N/A INTERVAL N/A visit_BIT N/A N/A self type_ N/A N/A N/A N/A type_ varying N/A N/A compiled BIT VARYING N/A N/A N/A type_ length None N/A N/A compiled N/A (%d) N/A type_ length N/A N/A compiled N/A BIT(%d) N/A type_ length N/A compiled N/A visit_UUID N/A N/A self type_ N/A N/A N/A UUID N/A visit_large_binary N/A N/A self type_ N/A N/A N/A N/A N/A self visit_BYTEA type_ N/A visit_BYTEA N/A N/A self type_ N/A N/A N/A BYTEA N/A visit_ARRAY N/A N/A self type_ N/A N/A N/A N/A N/A N/A self process N/A type_ item_type N/A [] N/A N/A N/A type_ dimensions None N/A type_ dimensions 1 N/A N/A PGIdentifierPreparer N/A N/A compiler IdentifierPreparer N/A N/A reserved_words RESERVED_WORDS _unquote_identifier N/A N/A self value N/A N/A N/A N/A N/A value N/A 0 N/A self initial_quote N/A N/A value N/A N/A N/A value N/A 1 -1 replace N/A self escape_to_quote N/A self escape_quote N/A value N/A format_type N/A N/A self type_ use_schema N/A True N/A N/A N/A N/A type_ name N/A N/A N/A N/A exc CompileError Postgresql ENUM type requires a name. N/A name N/A N/A self quote N/A type_ name N/A N/A N/A N/A self omit_schema use_schema N/A N/A type_ schema None N/A N/A name N/A N/A N/A N/A self quote_schema N/A type_ schema . name N/A name N/A N/A PGInspector N/A N/A reflection Inspector N/A __init__ N/A N/A self conn N/A N/A N/A N/A N/A N/A reflection Inspector __init__ self conn N/A get_table_oid N/A N/A self table_name schema N/A None N/A N/A Return the oid from `table_name` and `schema`. N/A N/A N/A N/A self dialect get_table_oid N/A self bind table_name schema info_cache N/A self info_cache N/A N/A CreateEnumType N/A N/A schema _CreateDropBase N/A N/A __visit_name__ create_enum_type N/A DropEnumType N/A N/A schema _CreateDropBase N/A N/A __visit_name__ drop_enum_type N/A PGExecutionContext N/A N/A default DefaultExecutionContext N/A fire_sequence N/A N/A self seq type_ N/A N/A N/A N/A N/A self _execute_scalar N/A select nextval('%s') N/A N/A N/A N/A self dialect identifier_preparer format_sequence seq type_ N/A get_insert_default N/A N/A self column N/A N/A N/A N/A N/A column primary_key N/A column N/A N/A column table _autoincrement_column N/A N/A N/A N/A column server_default N/A N/A column server_default has_argument N/A N/A N/A N/A self _execute_scalar N/A select %s N/A N/A column server_default arg N/A column type N/A N/A N/A N/A N/A column default None N/A N/A N/A column default is_sequence N/A N/A column default optional N/A N/A N/A N/A seq_name N/A column _postgresql_seq_name N/A N/A N/A AttributeError N/A N/A tab N/A N/A column table name N/A col N/A column name N/A tab N/A tab N/A 0 N/A 29 N/A max 0 N/A 29 N/A len col N/A col N/A col N/A 0 N/A 29 N/A max 0 N/A 29 N/A len tab N/A name N/A %s_%s_seq N/A tab col N/A N/A column _postgresql_seq_name seq_name name N/A sch N/A N/A column table schema N/A N/A sch None N/A N/A exc N/A select nextval('"%s"."%s"') N/A sch seq_name N/A N/A exc N/A select nextval('"%s"') N/A seq_name N/A N/A N/A self _execute_scalar exc N/A column type N/A N/A N/A N/A super PGExecutionContext self get_insert_default column N/A N/A PGDialect N/A N/A default DefaultDialect N/A N/A name postgresql N/A supports_alter True N/A max_identifier_length 63 N/A supports_sane_rowcount True N/A supports_native_enum True N/A supports_native_boolean True N/A supports_smallserial True N/A supports_sequences True N/A sequences_optional True N/A preexecute_autoincrement_sequences True N/A postfetch_lastrowid False N/A supports_default_values True N/A supports_empty_insert False N/A supports_multivalues_insert True N/A default_paramstyle pyformat N/A ischema_names ischema_names N/A colspecs colspecs N/A statement_compiler PGCompiler N/A ddl_compiler PGDDLCompiler N/A type_compiler PGTypeCompiler N/A preparer PGIdentifierPreparer N/A execution_ctx_cls PGExecutionContext N/A inspector PGInspector N/A isolation_level None N/A construct_arguments N/A N/A N/A schema Index N/A using where ops concurrently False None N/A False N/A N/A schema Table N/A ignore_search_path False N/A reflection_options N/A postgresql_ignore_search_path N/A _backslash_escapes True __init__ N/A N/A self isolation_level json_serializer json_deserializer N/A None None None kwargs N/A N/A N/A N/A N/A default DefaultDialect __init__ self kwargs N/A N/A self isolation_level isolation_level N/A N/A self _json_deserializer json_deserializer N/A N/A self _json_serializer json_serializer N/A initialize N/A N/A self connection N/A N/A N/A N/A N/A N/A super PGDialect self initialize connection N/A N/A self implicit_returning N/A N/A N/A self server_version_info N/A 8 2 N/A N/A N/A self __dict__ get implicit_returning True N/A N/A self supports_native_enum N/A N/A self server_version_info N/A 8 3 N/A N/A N/A self supports_native_enum N/A N/A N/A self colspecs N/A N/A N/A self colspecs copy N/A N/A N/A N/A self colspecs pop N/A sqltypes Enum None N/A N/A N/A N/A self colspecs pop ENUM None N/A N/A self supports_smallserial N/A N/A self server_version_info N/A 9 2 N/A N/A self _backslash_escapes N/A N/A N/A self server_version_info N/A 8 2 N/A N/A N/A connection scalar show standard_conforming_strings off N/A on_connect N/A N/A self N/A N/A N/A N/A N/A self isolation_level None N/A connect N/A N/A conn N/A N/A N/A N/A N/A self set_isolation_level conn N/A self isolation_level N/A N/A connect N/A N/A None N/A N/A _isolation_lookup N/A set N/A SERIALIZABLE READ UNCOMMITTED READ COMMITTED REPEATABLE READ set_isolation_level N/A N/A self connection level N/A N/A N/A level N/A N/A level replace _ N/A N/A level N/A self _isolation_lookup N/A N/A N/A N/A exc ArgumentError N/A Invalid value '%s' for isolation_level. Valid isolation levels for %s are %s N/A level N/A self name N/A N/A ,  join N/A self _isolation_lookup N/A cursor N/A N/A connection cursor N/A N/A N/A cursor execute N/A SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL %s level N/A N/A N/A cursor execute COMMIT N/A N/A N/A cursor close N/A get_isolation_level N/A N/A self connection N/A N/A N/A cursor N/A N/A connection cursor N/A N/A N/A cursor execute show transaction isolation level N/A val N/A N/A N/A cursor fetchone N/A 0 N/A N/A N/A cursor close N/A N/A N/A val upper N/A do_begin_twophase N/A N/A self connection xid N/A N/A N/A N/A N/A self do_begin N/A connection connection N/A do_prepare_twophase N/A N/A self connection xid N/A N/A N/A N/A N/A connection execute N/A PREPARE TRANSACTION '%s' xid N/A do_rollback_twophase N/A N/A self connection xid is_prepared recover N/A True False N/A N/A is_prepared N/A N/A recover N/A N/A N/A N/A connection execute ROLLBACK N/A N/A N/A connection execute N/A ROLLBACK PREPARED '%s' xid N/A N/A N/A connection execute BEGIN N/A N/A N/A self do_rollback N/A connection connection N/A N/A N/A N/A self do_rollback N/A connection connection N/A do_commit_twophase N/A N/A self connection xid is_prepared recover N/A True False N/A N/A is_prepared N/A N/A recover N/A N/A N/A N/A connection execute ROLLBACK N/A N/A N/A connection execute N/A COMMIT PREPARED '%s' xid N/A N/A N/A connection execute BEGIN N/A N/A N/A self do_rollback N/A connection connection N/A N/A N/A N/A self do_commit N/A connection connection N/A do_recover_twophase N/A N/A self connection N/A N/A N/A resultset N/A N/A connection execute N/A N/A sql text SELECT gid FROM pg_prepared_xacts N/A N/A N/A row N/A 0 N/A row resultset N/A _get_default_schema_name N/A N/A self connection N/A N/A N/A N/A N/A connection scalar select current_schema() N/A has_schema N/A N/A self connection schema N/A N/A N/A query select nspname from pg_namespace where lower(nspname)=:schema N/A cursor N/A N/A connection execute N/A N/A sql text query bindparams N/A N/A N/A sql bindparam schema N/A N/A util text_type N/A N/A schema lower type_ N/A sqltypes Unicode N/A N/A bool N/A N/A cursor first N/A has_table N/A N/A self connection table_name schema N/A None N/A N/A N/A schema None N/A N/A cursor N/A N/A connection execute N/A N/A sql text select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=current_schema() and relname=:name bindparams N/A N/A N/A sql bindparam name N/A N/A util text_type table_name type_ N/A sqltypes Unicode N/A N/A cursor N/A N/A connection execute N/A N/A sql text select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=:schema and relname=:name bindparams N/A N/A N/A sql bindparam name N/A N/A util text_type table_name type_ N/A sqltypes Unicode N/A N/A sql bindparam schema N/A N/A util text_type schema type_ N/A sqltypes Unicode N/A N/A bool N/A N/A cursor first N/A has_sequence N/A N/A self connection sequence_name schema N/A None N/A N/A N/A schema None N/A N/A cursor N/A N/A connection execute N/A N/A sql text SELECT relname FROM pg_class c join pg_namespace n on n.oid=c.relnamespace where relkind='S' and n.nspname=current_schema() and relname=:name bindparams N/A N/A N/A sql bindparam name N/A N/A util text_type sequence_name type_ N/A sqltypes Unicode N/A N/A cursor N/A N/A connection execute N/A N/A sql text SELECT relname FROM pg_class c join pg_namespace n on n.oid=c.relnamespace where relkind='S' and n.nspname=:schema and relname=:name bindparams N/A N/A N/A sql bindparam name N/A N/A util text_type sequence_name type_ N/A sqltypes Unicode N/A N/A sql bindparam schema N/A N/A util text_type schema type_ N/A sqltypes Unicode N/A N/A bool N/A N/A cursor first N/A has_type N/A N/A self connection type_name schema N/A None N/A N/A N/A schema None N/A N/A query 
            SELECT EXISTS (
                SELECT * FROM pg_catalog.pg_type t, pg_catalog.pg_namespace n
                WHERE t.typnamespace = n.oid
                AND t.typname = :typname
                AND n.nspname = :nspname
                )
                 N/A query N/A N/A sql text query N/A N/A query 
            SELECT EXISTS (
                SELECT * FROM pg_catalog.pg_type t
                WHERE t.typname = :typname
                AND pg_type_is_visible(t.oid)
                )
                 N/A query N/A N/A sql text query N/A query N/A N/A query bindparams N/A N/A sql bindparam typname N/A N/A util text_type type_name type_ N/A sqltypes Unicode N/A N/A schema None N/A N/A query N/A N/A query bindparams N/A N/A sql bindparam nspname N/A N/A util text_type schema type_ N/A sqltypes Unicode N/A cursor N/A N/A connection execute query N/A N/A bool N/A N/A cursor scalar N/A _get_server_version_info N/A N/A self connection N/A N/A N/A v N/A N/A N/A N/A connection execute select version() scalar N/A m N/A N/A re match .*(?:PostgreSQL|EnterpriseDB) (\d+)\.(\d+)(?:\.(\d+))?(?:\.\d+)?(?:devel)? v N/A N/A m N/A N/A N/A AssertionError N/A Could not determine version from string '%s' v N/A N/A tuple N/A N/A int x N/A x N/A N/A m group 1 2 3 N/A x None N/A get_table_oid N/A N/A self connection table_name schema N/A None kw N/A N/A Fetch the oid for schema.table_name.

        Several reflection methods require the table oid.  The idea for using
        this method is that it can be fetched one time and cached for
        subsequent calls.

         N/A table_oid None N/A N/A schema None N/A N/A schema_where_clause n.nspname = :schema N/A N/A schema_where_clause pg_catalog.pg_table_is_visible(c.oid) N/A query N/A 
            SELECT c.oid
            FROM pg_catalog.pg_class c
            LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
            WHERE (%s)
            AND c.relname = :table_name AND c.relkind in ('r','v')
         schema_where_clause N/A table_name N/A N/A util text_type table_name N/A N/A schema None N/A N/A schema N/A N/A util text_type schema N/A s N/A N/A N/A N/A sql text query bindparams table_name N/A sqltypes Unicode N/A s N/A N/A s columns oid N/A sqltypes Integer N/A schema N/A N/A s N/A N/A s bindparams N/A N/A sql bindparam schema type_ N/A sqltypes Unicode N/A c N/A N/A connection execute s table_name table_name schema schema N/A table_oid N/A N/A c scalar N/A N/A table_oid None N/A N/A N/A N/A exc NoSuchTableError table_name N/A table_oid N/A N/A reflection cache get_schema_names N/A N/A self connection N/A kw N/A N/A s 
        SELECT nspname
        FROM pg_namespace
        ORDER BY nspname
         N/A rp N/A N/A connection execute s N/A N/A util py2k N/A N/A schema_names N/A N/A N/A N/A row N/A 0 decode N/A self encoding N/A row rp N/A N/A N/A N/A row N/A 0 startswith pg_ N/A N/A schema_names N/A N/A row N/A 0 N/A row rp N/A N/A N/A N/A row N/A 0 startswith pg_ N/A schema_names N/A N/A reflection cache get_table_names N/A N/A self connection schema N/A None kw N/A N/A N/A schema None N/A N/A current_schema schema N/A N/A current_schema N/A self default_schema_name N/A result N/A N/A connection execute N/A N/A sql text N/A SELECT relname FROM pg_class c WHERE relkind = 'r' AND '%s' = (select nspname from pg_namespace n where n.oid = c.relnamespace)  current_schema typemap N/A relname N/A sqltypes Unicode N/A N/A N/A row N/A 0 N/A row result N/A N/A reflection cache get_view_names N/A N/A self connection schema N/A None kw N/A N/A N/A schema None N/A N/A current_schema schema N/A N/A current_schema N/A self default_schema_name N/A s N/A 
        SELECT relname
        FROM pg_class c
        WHERE relkind = 'v'
          AND '%(schema)s' = (select nspname from pg_namespace n
          where n.oid = c.relnamespace)
         N/A dict schema current_schema N/A N/A util py2k N/A N/A view_names N/A N/A N/A N/A row N/A 0 decode N/A self encoding N/A row N/A N/A connection execute s N/A N/A view_names N/A N/A row N/A 0 N/A row N/A N/A connection execute s N/A view_names N/A N/A reflection cache get_view_definition N/A N/A self connection view_name schema N/A None kw N/A N/A N/A schema None N/A N/A current_schema schema N/A N/A current_schema N/A self default_schema_name N/A s 
        SELECT definition FROM pg_views
        WHERE schemaname = :schema
        AND viewname = :view_name
         N/A rp N/A N/A connection execute N/A N/A sql text s view_name view_name schema current_schema N/A rp N/A N/A N/A util py2k N/A N/A view_def N/A N/A N/A N/A rp scalar decode N/A self encoding N/A N/A view_def N/A N/A rp scalar N/A view_def N/A N/A reflection cache get_columns N/A N/A self connection table_name schema N/A None kw N/A N/A table_oid N/A N/A self get_table_oid connection table_name schema info_cache N/A N/A kw get info_cache N/A SQL_COLS 
            SELECT a.attname,
              pg_catalog.format_type(a.atttypid, a.atttypmod),
              (SELECT pg_catalog.pg_get_expr(d.adbin, d.adrelid)
                FROM pg_catalog.pg_attrdef d
               WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum
               AND a.atthasdef)
              AS DEFAULT,
              a.attnotnull, a.attnum, a.attrelid as table_oid
            FROM pg_catalog.pg_attribute a
            WHERE a.attrelid = :table_oid
            AND a.attnum > 0 AND NOT a.attisdropped
            ORDER BY a.attnum
         N/A s N/A N/A sql text SQL_COLS bindparams N/A N/A N/A sql bindparam table_oid type_ N/A sqltypes Integer typemap N/A attname default N/A sqltypes Unicode N/A sqltypes Unicode N/A c N/A N/A connection execute s table_oid table_oid N/A rows N/A N/A c fetchall N/A domains N/A N/A self _load_domains connection N/A enums N/A N/A self _load_enums connection N/A columns N/A N/A N/A name format_type default notnull attnum table_oid rows N/A N/A column_info N/A N/A self _get_column_info name format_type default notnull domains enums schema N/A N/A N/A columns append column_info N/A columns N/A N/A reflection cache _get_column_info N/A N/A self name format_type default notnull domains enums schema N/A N/A N/A attype N/A N/A re sub \(.*\) format_type N/A attype N/A N/A re sub \[\] attype N/A nullable N/A notnull N/A is_array N/A N/A format_type endswith [] N/A charlen N/A N/A re search \(([\d,]+)\) format_type N/A charlen N/A N/A charlen N/A N/A charlen group 1 N/A args N/A N/A re search \((.*)\) format_type N/A N/A args N/A N/A args group 1 N/A N/A args N/A tuple N/A N/A re split \s*,\s* N/A N/A args group 1 N/A N/A args N/A N/A kwargs N/A N/A N/A attype numeric N/A N/A charlen N/A N/A N/A prec scale N/A N/A charlen split , N/A args N/A N/A int prec N/A int scale N/A N/A args N/A N/A N/A N/A attype double precision N/A N/A args N/A 53 N/A N/A N/A attype integer N/A N/A args N/A N/A N/A N/A attype N/A timestamp with time zone time with time zone N/A N/A N/A kwargs N/A timezone True N/A charlen N/A N/A N/A kwargs N/A precision N/A int charlen N/A args N/A N/A N/A N/A attype N/A timestamp without time zone time without time zone time N/A N/A N/A kwargs N/A timezone False N/A charlen N/A N/A N/A kwargs N/A precision N/A int charlen N/A args N/A N/A N/A N/A attype bit varying N/A N/A N/A kwargs N/A varying True N/A charlen N/A N/A args N/A N/A int charlen N/A N/A args N/A N/A N/A N/A attype N/A interval interval year to month interval day to second N/A N/A charlen N/A N/A N/A kwargs N/A precision N/A int charlen N/A args N/A N/A N/A charlen N/A N/A args N/A N/A int charlen N/A True N/A N/A N/A attype N/A self ischema_names N/A N/A coltype N/A N/A self ischema_names N/A attype N/A N/A N/A N/A attype enums N/A N/A enum N/A enums N/A attype N/A coltype ENUM N/A N/A . attype N/A N/A N/A N/A kwargs N/A schema N/A kwargs N/A name N/A N/A attype split . N/A N/A N/A kwargs N/A name attype N/A args N/A tuple N/A enum N/A labels N/A N/A N/A N/A attype domains N/A N/A domain N/A domains N/A attype N/A attype N/A domain N/A attype N/A nullable N/A domain N/A nullable N/A N/A N/A domain N/A default N/A default N/A N/A default N/A domain N/A default N/A N/A N/A coltype None N/A N/A coltype N/A N/A coltype N/A coltype args kwargs N/A is_array N/A N/A coltype N/A ARRAY coltype N/A N/A N/A N/A util warn N/A Did not recognize type '%s' of column '%s' N/A attype name N/A coltype N/A sqltypes NULLTYPE N/A autoincrement False N/A N/A default None N/A N/A match N/A N/A re search (nextval\(')([^']+)('.*$) default N/A N/A match None N/A N/A autoincrement True N/A sch schema N/A N/A N/A . N/A N/A match group 2 N/A sch None N/A N/A default N/A N/A N/A N/A N/A N/A match group 1 N/A "%s" sch . N/A N/A match group 2 N/A N/A match group 3 N/A column_info N/A dict name name type coltype nullable nullable default default autoincrement autoincrement N/A column_info N/A get_pk_constraint N/A N/A self connection table_name schema N/A None kw N/A N/A table_oid N/A N/A self get_table_oid connection table_name schema info_cache N/A N/A kw get info_cache N/A N/A N/A self server_version_info N/A 8 4 N/A N/A PK_SQL N/A 
                SELECT a.attname
                FROM
                    pg_class t
                    join pg_index ix on t.oid = ix.indrelid
                    join pg_attribute a
                        on t.oid=a.attrelid AND %s
                 WHERE
                  t.oid = :table_oid and ix.indisprimary = 't'
                ORDER BY a.attnum
             N/A N/A self _pg_index_any a.attnum ix.indkey N/A N/A PK_SQL 
                SELECT a.attname
                FROM pg_attribute a JOIN (
                    SELECT unnest(ix.indkey) attnum,
                           generate_subscripts(ix.indkey, 1) ord
                    FROM pg_index ix
                    WHERE ix.indrelid = :table_oid AND ix.indisprimary
                    ) k ON a.attnum=k.attnum
                WHERE a.attrelid = :table_oid
                ORDER BY k.ord
             N/A t N/A N/A sql text PK_SQL typemap N/A attname N/A sqltypes Unicode N/A c N/A N/A connection execute t table_oid table_oid N/A cols N/A N/A r N/A 0 N/A r N/A N/A c fetchall N/A PK_CONS_SQL 
        SELECT conname
           FROM  pg_catalog.pg_constraint r
           WHERE r.conrelid = :table_oid AND r.contype = 'p'
           ORDER BY 1
         N/A t N/A N/A sql text PK_CONS_SQL typemap N/A conname N/A sqltypes Unicode N/A c N/A N/A connection execute t table_oid table_oid N/A name N/A N/A c scalar N/A N/A constrained_columns name cols name N/A N/A reflection cache get_foreign_keys N/A N/A self connection table_name schema postgresql_ignore_search_path N/A None False kw N/A N/A preparer N/A self identifier_preparer N/A table_oid N/A N/A self get_table_oid connection table_name schema info_cache N/A N/A kw get info_cache N/A FK_SQL 
          SELECT r.conname,
                pg_catalog.pg_get_constraintdef(r.oid, true) as condef,
                n.nspname as conschema
          FROM  pg_catalog.pg_constraint r,
                pg_namespace n,
                pg_class c

          WHERE r.conrelid = :table AND
                r.contype = 'f' AND
                c.oid = confrelid AND
                n.oid = c.relnamespace
          ORDER BY 1
         N/A FK_REGEX N/A N/A re compile FOREIGN KEY \((.*?)\) REFERENCES (?:(.*?)\.)?(.*?)\((.*?)\)[\s]?(MATCH (FULL|PARTIAL|SIMPLE)+)?[\s]?(ON UPDATE (CASCADE|RESTRICT|NO ACTION|SET NULL|SET DEFAULT)+)?[\s]?(ON DELETE (CASCADE|RESTRICT|NO ACTION|SET NULL|SET DEFAULT)+)?[\s]?(DEFERRABLE|NOT DEFERRABLE)?[\s]?(INITIALLY (DEFERRED|IMMEDIATE)+)? N/A t N/A N/A sql text FK_SQL typemap N/A conname condef N/A sqltypes Unicode N/A sqltypes Unicode N/A c N/A N/A connection execute t table table_oid N/A fkeys N/A N/A N/A conname condef conschema N/A N/A c fetchall N/A N/A m N/A N/A N/A N/A re search FK_REGEX condef groups N/A N/A constrained_columns referred_schema referred_table referred_columns _ match _ onupdate _ ondelete deferrable _ initially m N/A N/A deferrable None N/A N/A deferrable N/A N/A deferrable DEFERRABLE True False N/A constrained_columns N/A N/A N/A preparer _unquote_identifier x N/A x N/A N/A re split \s*,\s* constrained_columns N/A postgresql_ignore_search_path N/A N/A N/A conschema N/A self default_schema_name N/A N/A referred_schema conschema N/A N/A referred_schema schema N/A N/A referred_schema N/A N/A referred_schema N/A N/A preparer _unquote_identifier referred_schema N/A N/A N/A N/A schema None N/A schema conschema N/A N/A referred_schema schema N/A referred_table N/A N/A preparer _unquote_identifier referred_table N/A referred_columns N/A N/A N/A preparer _unquote_identifier x N/A x N/A N/A re split \s*,\s referred_columns N/A fkey_d N/A name constrained_columns referred_schema referred_table referred_columns options conname constrained_columns referred_schema referred_table referred_columns N/A onupdate ondelete deferrable initially match onupdate ondelete deferrable initially match N/A N/A N/A fkeys append fkey_d N/A fkeys N/A N/A reflection cache _pg_index_any N/A N/A self col compare_to N/A N/A N/A N/A N/A self server_version_info N/A 8 1 N/A N/A N/A (%s) N/A N/A  OR  join N/A N/A %s[%d] = %s N/A compare_to ind col N/A ind N/A range 0 10 N/A N/A N/A %s = ANY(%s) N/A col compare_to N/A get_indexes N/A N/A self connection table_name schema N/A kw N/A N/A table_oid N/A N/A self get_table_oid connection table_name schema info_cache N/A N/A kw get info_cache N/A IDX_SQL N/A 
          SELECT
              i.relname as relname,
              ix.indisunique, ix.indexprs, ix.indpred,
              a.attname, a.attnum, ix.indkey%s
          FROM
              pg_class t
                    join pg_index ix on t.oid = ix.indrelid
                    join pg_class i on i.oid=ix.indexrelid
                    left outer join
                        pg_attribute a
                        on t.oid=a.attrelid and %s
          WHERE
              t.relkind = 'r'
              and t.oid = :table_oid
              and ix.indisprimary = 'f'
          ORDER BY
              t.relname,
              i.relname
         N/A N/A N/A N/A self server_version_info N/A 8 3 ::varchar N/A N/A self _pg_index_any a.attnum ix.indkey N/A t N/A N/A sql text IDX_SQL typemap N/A attname N/A sqltypes Unicode N/A c N/A N/A connection execute t table_oid table_oid N/A indexes N/A defaultdict N/A N/A N/A N/A N/A defaultdict dict N/A sv_idx_name None N/A row N/A N/A c fetchall N/A N/A N/A idx_name unique expr prd col col_num idx_key row N/A expr N/A N/A N/A idx_name sv_idx_name N/A N/A N/A N/A util warn N/A Skipped unsupported reflection of expression-based index %s idx_name N/A sv_idx_name idx_name N/A N/A N/A prd N/A N/A idx_name sv_idx_name N/A N/A N/A N/A util warn N/A Predicate of partial index %s ignored during reflection idx_name N/A sv_idx_name idx_name N/A index N/A indexes N/A idx_name N/A N/A col None N/A N/A N/A N/A index N/A cols N/A col_num col N/A N/A index N/A key N/A N/A int N/A N/A k strip N/A k N/A N/A idx_key split N/A N/A index N/A unique unique N/A N/A N/A name unique column_names name N/A idx N/A unique N/A N/A N/A idx N/A cols N/A i N/A i N/A idx N/A key N/A N/A name idx N/A N/A indexes items N/A N/A reflection cache get_unique_constraints N/A N/A self connection table_name schema N/A None kw N/A N/A table_oid N/A N/A self get_table_oid connection table_name schema info_cache N/A N/A kw get info_cache N/A UNIQUE_SQL 
            SELECT
                cons.conname as name,
                cons.conkey as key,
                a.attnum as col_num,
                a.attname as col_name
            FROM
                pg_catalog.pg_constraint cons
                join pg_attribute a
                  on cons.conrelid = a.attrelid AND
                    a.attnum = ANY(cons.conkey)
            WHERE
                cons.conrelid = :table_oid AND
                cons.contype = 'u'
         N/A t N/A N/A sql text UNIQUE_SQL typemap N/A col_name N/A sqltypes Unicode N/A c N/A N/A connection execute t table_oid table_oid N/A uniques N/A defaultdict N/A N/A N/A N/A N/A defaultdict dict N/A row N/A N/A c fetchall N/A N/A uc N/A uniques N/A N/A row name N/A N/A uc N/A key N/A row key N/A N/A N/A uc N/A cols N/A N/A row col_num N/A row col_name N/A N/A N/A name column_names name N/A N/A N/A uc N/A cols N/A i N/A i N/A uc N/A key N/A N/A name uc N/A N/A uniques items N/A N/A reflection cache _load_enums N/A N/A self connection N/A N/A N/A N/A N/A self supports_native_enum N/A N/A N/A N/A SQL_ENUMS 
            SELECT t.typname as "name",
               -- no enum defaults in 8.4 at least
               -- t.typdefault as "default",
               pg_catalog.pg_type_is_visible(t.oid) as "visible",
               n.nspname as "schema",
               e.enumlabel as "label"
            FROM pg_catalog.pg_type t
                 LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
                 LEFT JOIN pg_catalog.pg_enum e ON t.oid = e.enumtypid
            WHERE t.typtype = 'e'
            ORDER BY "name", e.oid -- e.oid gives us label order
         N/A s N/A N/A sql text SQL_ENUMS typemap N/A attname label N/A sqltypes Unicode N/A sqltypes Unicode N/A c N/A N/A connection execute s N/A enums N/A N/A enum N/A N/A c fetchall N/A N/A N/A enum N/A visible N/A N/A name N/A enum N/A name N/A N/A name N/A %s.%s N/A N/A enum N/A schema N/A enum N/A name N/A N/A name enums N/A N/A N/A N/A N/A N/A enums N/A name N/A labels append N/A enum N/A label N/A N/A N/A enums N/A name N/A labels N/A N/A enum N/A label N/A enums N/A _load_domains N/A N/A self connection N/A N/A N/A SQL_DOMAINS 
            SELECT t.typname as "name",
               pg_catalog.format_type(t.typbasetype, t.typtypmod) as "attype",
               not t.typnotnull as "nullable",
               t.typdefault as "default",
               pg_catalog.pg_type_is_visible(t.oid) as "visible",
               n.nspname as "schema"
            FROM pg_catalog.pg_type t
               LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
            WHERE t.typtype = 'd'
         N/A s N/A N/A sql text SQL_DOMAINS typemap N/A attname N/A sqltypes Unicode N/A c N/A N/A connection execute s N/A domains N/A N/A domain N/A N/A c fetchall N/A N/A attype N/A N/A N/A N/A re search ([^\(]+) N/A domain N/A attype group 1 N/A N/A domain N/A visible N/A N/A name N/A domain N/A name N/A N/A name N/A %s.%s N/A N/A domain N/A schema N/A domain N/A name N/A N/A domains N/A name N/A attype nullable default attype N/A domain N/A nullable N/A domain N/A default N/A domains N/A N/A