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/tutorial/syscat.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/tutorial/syscat.py')
-rwxr-xr-x | src/interfaces/python/tutorial/syscat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/python/tutorial/syscat.py b/src/interfaces/python/tutorial/syscat.py index f45d62470d0..1ab1d5840c2 100755 --- a/src/interfaces/python/tutorial/syscat.py +++ b/src/interfaces/python/tutorial/syscat.py @@ -37,7 +37,7 @@ def list_simple_ind(pgcnx): FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE i.indrelid = bc.oid AND i.indexrelid = bc.oid AND i.indkey[0] = a.attnum AND a.attrelid = bc.oid - AND i.indproc = '0'::oid + AND i.indproc = '0'::oid AND a.attisdropped = 'f' ORDER BY class_name, index_name, attname""") return result @@ -48,6 +48,7 @@ def list_all_attr(pgcnx): WHERE c.relkind = 'r' and c.relname !~ '^pg_' AND c.relname !~ '^Inv' and a.attnum > 0 AND a.attrelid = c.oid and a.atttypid = t.oid + AND a.attisdropped = 'f' ORDER BY relname, attname""") return result |