Changeset 722 for trunk


Ignore:
Timestamp:
Jan 12, 2016, 8:28:43 AM (4 years ago)
Author:
cito
Message:

Back port some code changes from trunk to 4.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pg.py

    r721 r722  
    4747
    4848
    49 # Auxiliary functions which are independent from a DB connection:
     49# Auxiliary functions that are independent from a DB connection:
    5050
    5151def _is_quoted(s):
     
    622622        where = " AND r.relkind IN (%s)" % ','.join(
    623623            ["'%s'" % k for k in kinds]) if kinds else ''
    624         return [_join_parts(r) for r in self.db.query(
    625             "SELECT s.nspname, r.relname"
     624        q = ("SELECT s.nspname, r.relname"
    626625            " FROM pg_class r"
    627626            " JOIN pg_namespace s ON s.oid = r.relnamespace"
    628627            " WHERE s.nspname NOT SIMILAR"
    629628            " TO 'pg/_%%|information/_schema' ESCAPE '/' %s"
    630             " ORDER BY 1, 2" % where).getresult()]
     629            " ORDER BY 1, 2") % where
     630        return [_join_parts(r) for r in self.db.query(q).getresult()]
    631631
    632632    def get_tables(self):
Note: See TracChangeset for help on using the changeset viewer.