diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-08-15 03:32:36 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-08-15 03:32:36 +0000 |
commit | 4f1ac055f1a7111c2373d3b930a89f1dab57c7fe (patch) | |
tree | 4edeba4ffbc4e807f39bf08a751dcaa8787007f8 /src/interfaces/python/pg.py | |
parent | 147aa84c1a0c4ed6444696e04881e938f38c3c20 (diff) | |
download | postgresql-4f1ac055f1a7111c2373d3b930a89f1dab57c7fe.tar.gz postgresql-4f1ac055f1a7111c2373d3b930a89f1dab57c7fe.zip |
Well, that certainly appeared to be very straight forward. pg.py and
syscat.py scripts were both modified. pg.py uses it to cache a list of
pks (which is seemingly does for every db connection) and various
attributes. syscat uses it to walk the list of system tables and
queries the various attributes from these tables.
In both cases, it seemingly makes sense to apply what you've requested.
Greg Copeland
Diffstat (limited to 'src/interfaces/python/pg.py')
-rw-r--r-- | src/interfaces/python/pg.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/python/pg.py b/src/interfaces/python/pg.py index d9d34d872c8..6a8d8ac78a2 100644 --- a/src/interfaces/python/pg.py +++ b/src/interfaces/python/pg.py @@ -69,7 +69,8 @@ class DB: WHERE pg_class.oid = pg_attribute.attrelid AND pg_class.oid = pg_index.indrelid AND pg_index.indkey[0] = pg_attribute.attnum AND - pg_index.indisprimary = 't'""").getresult(): + pg_index.indisprimary = 't' AND + pg_attribute.attisdropped = 'f'""").getresult(): self.__pkeys__[rel] = att # wrap query for debugging @@ -111,7 +112,8 @@ class DB: WHERE pg_class.relname = '%s' AND pg_attribute.attnum > 0 AND pg_attribute.attrelid = pg_class.oid AND - pg_attribute.atttypid = pg_type.oid""" + pg_attribute.atttypid = pg_type.oid AND + pg_attribute.attisdropped = 'f'""" l = {} for attname, typname in self.db.query(query % cl).getresult(): |