Changeset 719 for branches/4.x


Ignore:
Timestamp:
Jan 12, 2016, 7:27:13 AM (4 years ago)
Author:
cito
Message:

Better checks for system catalogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/pg.py

    r718 r719  
    591591                " JOIN pg_namespace"
    592592                    " ON pg_namespace.oid = pg_class.relnamespace"
    593                     " AND pg_namespace.nspname NOT LIKE 'pg_%'"
     593                    " AND pg_namespace.nspname"
     594                    " NOT SIMILAR TO 'pg/_%|information/_schema' ESCAPE '/'"
    594595                " JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid"
    595596                    " AND pg_attribute.attisdropped = 'f'"
     
    626627            " FROM pg_class "
    627628            " JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace "
    628             " WHERE %s pg_namespace.nspname != 'information_schema'"
    629                 " AND pg_namespace.nspname !~ '^pg_' "
     629            " WHERE %s pg_namespace.nspname"
     630            " NOT SIMILAR TO 'pg/_%%|information/_schema' ESCAPE '/'"
    630631            " ORDER BY 1, 2" % where).getresult()]
    631632
Note: See TracChangeset for help on using the changeset viewer.