Module Import alias Import alias FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults TupleLoad NameLoad body If CompareEq NameLoad NameLoad body Return TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults TupleLoad body If CompareEq NameLoad NameLoad body Return ListLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler body Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign NameStore ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad Str NameLoad Expr Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareEq NameLoad NameLoad body Return If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Str orelse Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad NameLoad body Return Assign NameStore Call AttributeLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad attr Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareEq NameLoad NameLoad body Return If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad attr Expr Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareEq NameLoad NameLoad body Return NameLoad If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad attr Assign NameStore BinOpMod Str NameLoad Return CompareGt Call NameLoad Call NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareEq NameLoad NameLoad body Return Num If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad attr Assign NameStore BinOpMod Str NameLoad Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad NameLoad Index Num Index Num If CompareEq NameLoad NameLoad body Return Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Num Assign NameStore Str Assign NameStore SubscriptLoad SubscriptLoad Call NameLoad NameLoad NameLoad Index Num Index Num If CompareEq NameLoad NameLoad body Return Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad NameLoad body Return Num Assign NameStore Call NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Return Num Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Dict Str Num Assign NameStore Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad NameLoad body Return Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Str Assign NameStore Call NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore BinOpMod Str NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Str Assign NameStore Call NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore BinOpMod Str NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A psycopg2 N/A sys connect N/A N/A dbname N/A N/A N/A N/A N/A connection N/A dbname='%s' user='sirrice' port='5432' dbname N/A db N/A N/A psycopg2 connect connection N/A N/A N/A N/A N/A N/A N/A sys stderr write couldn't connect
 N/A N/A N/A sys exit N/A db N/A prepare N/A N/A db queryline params bexit N/A N/A True N/A N/A N/A db None N/A N/A N/A N/A N/A cur N/A N/A db cursor N/A N/A N/A cur execute queryline N/A tuple params N/A N/A N/A db commit N/A N/A N/A cur close N/A N/A N/A N/A N/A N/A db rollback N/A bexit N/A N/A N/A N/A sys exit N/A N/A query N/A N/A db queryline args N/A N/A N/A N/A N/A db None N/A N/A N/A N/A N/A N/A cur N/A N/A db cursor N/A N/A N/A cur execute queryline args N/A N/A N/A result N/A N/A cur fetchall N/A N/A N/A N/A result N/A N/A N/A N/A cur close N/A N/A N/A Exception N/A e N/A N/A N/A N/A db rollback N/A N/A N/A N/A sys stderr write N/A %s e N/A result N/A N/A result N/A close N/A N/A db N/A N/A N/A N/A db None N/A N/A N/A N/A db close N/A vacuum N/A N/A db N/A N/A N/A N/A db None N/A N/A N/A isolation N/A db isolation_level N/A N/A N/A db set_isolation_level 0 N/A N/A prepare db vacuum; False N/A N/A prepare db analyze; False N/A N/A N/A db set_isolation_level isolation N/A rename N/A N/A conn oldname newname N/A N/A N/A N/A prepare conn N/A ALTER TABLE %s RENAME TO %s; N/A oldname newname False N/A addindex N/A N/A conn table attrs where name N/A None None N/A N/A N/A conn None N/A N/A N/A N/A name None N/A N/A name N/A N/A N/A idx_%s_%s N/A table N/A N/A _ join attrs lower N/A N/A where None N/A N/A where N/A N/A where N/A where %s where N/A q N/A CREATE INDEX %s ON %s (%s) %s; N/A name table N/A N/A , join attrs where N/A N/A prepare conn q False N/A clusterindex N/A N/A conn table attrs N/A N/A N/A N/A conn None N/A N/A N/A name N/A N/A N/A idx_%s_%s N/A table N/A N/A _ join attrs lower N/A tmptable N/A tmp_%s table N/A create N/A CREATE TABLE %s AS SELECT * from %s ORDER BY %s; N/A tmptable table N/A N/A  ,  join attrs N/A drop N/A DROP TABLE %s; table N/A alter N/A ALTER TABLE %s RENAME TO %s; N/A tmptable table N/A cluster N/A CLUSTER %s ON %s; N/A name table N/A N/A prepare conn N/A DROP TABLE %s; tmptable False N/A N/A prepare conn create False N/A N/A prepare conn drop False N/A N/A prepare conn alter False N/A N/A addindex conn table attrs N/A N/A prepare conn cluster False N/A dropindex N/A N/A conn table attrs name N/A None N/A N/A N/A conn None N/A N/A N/A N/A name None N/A N/A name N/A N/A N/A idx_%s_%s N/A table N/A N/A _ join attrs lower N/A N/A prepare conn N/A DROP INDEX %s; name False N/A indexexists N/A N/A conn table attrs name N/A None N/A N/A N/A conn None N/A N/A False N/A N/A name None N/A N/A name N/A N/A N/A idx_%s_%s N/A table N/A N/A _ join attrs lower N/A q N/A select * from pg_indexes where indexname = '%s'; name N/A N/A N/A len N/A query conn q 0 N/A indexsize N/A N/A conn table attrs name N/A None N/A N/A N/A conn None N/A N/A 0 N/A N/A name None N/A N/A name N/A N/A N/A idx_%s_%s N/A table N/A N/A _ join attrs lower N/A q N/A select pg_total_relation_size(indexname::text)
    from pg_indexes where schemaname != 'pg_catalog' and schemaname != 'information_schema' and indexname='%s'; name N/A v N/A N/A N/A query conn q N/A 0 N/A 0 N/A N/A v None N/A N/A 0 N/A N/A int v N/A indexsizes N/A N/A conn N/A N/A N/A N/A conn None N/A N/A 0 N/A q select sum(pg_total_relation_size(indexname::text))
    from pg_indexes where schemaname != 'pg_catalog' and schemaname != 'information_schema'; N/A v N/A N/A N/A query conn q N/A 0 N/A 0 N/A N/A v None N/A N/A 0 N/A N/A int v N/A tablesize N/A N/A conn tablename N/A N/A N/A N/A conn None N/A N/A 0 N/A sizes N/A tablesizes conn N/A N/A tablename sizes N/A N/A 0 N/A N/A sizes N/A tablename N/A tablesizes N/A N/A conn N/A N/A N/A N/A conn None N/A N/A N/A data 0 N/A q select tablename, pg_total_relation_size(tablename::text)
    from pg_tables where schemaname != 'pg_catalog' and schemaname != 'information_schema'; N/A ress N/A query conn q N/A ret N/A N/A res ress N/A N/A N/A ret N/A N/A res N/A 0 N/A res N/A 1 N/A ret N/A cleandatabase N/A N/A db N/A N/A N/A N/A db None N/A N/A N/A isolation N/A db isolation_level N/A N/A N/A db set_isolation_level 0 N/A q select tablename from pg_tables where schemaname='public' and tablename != 'data'; N/A tablenames N/A query db q N/A tablename tablenames N/A N/A d N/A drop table %s; tablename N/A N/A prepare db d False N/A q select indexname from pg_indexes where schemaname='public'; N/A indexnames N/A query db q N/A indexname indexnames N/A N/A d N/A drop index %s; indexname N/A N/A prepare db d False N/A N/A N/A db set_isolation_level isolation N/A