Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7775B9FA0AF for ; Sun, 14 Oct 2007 11:42:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12064-10 for ; Sun, 14 Oct 2007 11:41:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by postgresql.org (Postfix) with ESMTP id 2BCFA9FA065 for ; Sun, 14 Oct 2007 11:41:53 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id b27so1373463fka for ; Sun, 14 Oct 2007 07:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=yvWE24tub6bT0G6TiSIjmJbjSDlRb9Gr2XsIvG94djI=; b=f+/XQkrXgci/kqCs30QY1jfj0qLyL74flPHGTfw1zeFDBBWDsf5r4AcNosj/925eeTckpaVocg64JYjzPUmyU8g8FkFmUDlOXCeLTWVAo4smq6Q6um6Tu/NC21demtj5GVAj9/tpI3wVZmehI7AsloY6xU/JTSfl0AhEHL1LE44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=GK4RCdex3u6FqdF9Gc9wWxoZUbI4CafZRBafV9uQJ8pIoYtLxgnYFdmsua4SLlRr1+hATn6wcynXXlsGQo1OYphxklV7tYasWKXzPUG9Q6/i+P8JKQ1XS1AtKaamS43MC6XyFTyRyJCdSDd9NqUp1h3rbVXnXp+UCUT6Pg4kVE8= Received: by 10.82.138.6 with SMTP id l6mr9676421bud.1192372911042; Sun, 14 Oct 2007 07:41:51 -0700 (PDT) Received: by 10.82.122.16 with HTTP; Sun, 14 Oct 2007 07:41:51 -0700 (PDT) Message-ID: <58729a240710140741r6384478evb2a7d732804fd9e1@mail.gmail.com> Date: Sun, 14 Oct 2007 16:41:51 +0200 From: "Patrick De Zlio" To: pgsql-admin@postgresql.org Subject: Inconsistent result from request MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_31580_32212528.1192372911037" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/111 X-Sequence-Number: 27025 ------=_Part_31580_32212528.1192372911037 Content-Type: multipart/alternative; boundary="----=_Part_31581_22785971.1192372911037" ------=_Part_31581_22785971.1192372911037 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi listers, As a PG administrator, I'm trying to read technical data from pg_class table to monitor tables and indexes space. We are running a quite big postgres platform, with multiple databases, multiples schemes in each database, and hundreds tables. When I run the attach python script, I get 1809 rows as result. When I run the included (from the script) select query from phpPgAdmin or pgAdmin III, I get 2010 rows as result. When I try to focus on specific table including where relname ='tablename' in both parts of the join, I also get different numbers of rows. So I can't have the full size of all indexes attached on a table. Does anyone has a clue of why the same query, on same database gives different result depending on it is included in a python script, or ran from a console? Many Thanks Patrick ------=_Part_31581_22785971.1192372911037 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi listers,

As a PG administrator, I'm trying to read technical data from pg_class table to monitor tables and indexes space.

We are running a quite big postgres platform, with multiple databases, multiples schemes in each database, and hundreds tables.

When I run the attach python script, I get 1809 rows as result. When I run the included (from the script) select query from phpPgAdmin or pgAdmin III, I get 2010 rows as result.

When I try to focus on specific table including where relname ='tablename' in both parts of the join, I also get different numbers of rows. So I can't have the full size of all indexes attached on a table.

Does anyone has a clue of why the same query, on same database gives different result depending on it is included in a python script, or ran from a console?

Many Thanks
Patrick
------=_Part_31581_22785971.1192372911037-- ------=_Part_31580_32212528.1192372911037 Content-Type: text/x-python; name="pgtables.py" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py"; filename="pgtables.py" X-Attachment-Id: f_f7rnr74k IyEvdXNyL2Jpbi9weXRob24yLjQKIwoKaW1wb3J0IHN5cwppbXBvcnQgcGdkYgoKREVCVUcgPSBU cnVlCmdsb2JhbCBkYgojCiMgRGF0YWJhc2UgYWNjZXNzIAojCmRlZiBvcGVuZGIoKToKICAgIGds b2JhbCBkYgogICAgIyBjb25uZWN0IHRvIGRhdGFiYXNlCiAgICBwb3J0PSc1NDMyJwogICAgdXNl cm5hbWU9J3h4eHh4eHgnCiAgICBkYm5hbWU9J3h4eHh4eHgnCiAgICBob3N0PSd4eC54eC54eC54 eCcKICAgIHBhc3N3b3JkPSd4eHh4eHh4JwoKICAgIHRyeToKCWRiID0gcGdkYi5jb25uZWN0KGRh dGFiYXNlPWRibmFtZSxob3N0PWhvc3QsIHVzZXI9dXNlcm5hbWUsIHBhc3N3b3JkPXBhc3N3b3Jk KQogICAgZXhjZXB0IEV4Y2VwdGlvbiwgZGV0YWlsOgoJZGIucm9sbGJhY2soKQoJaWYgREVCVUc6 CgkJcHJpbnQgJ0Vycm9yIG9jY3VyZWQgd2hpbGUgY29ubmVjdGluZyB0byBkYXRhYmFzZSA6ICVz JyAlIGRldGFpbAoJc3lzLmV4aXQoMCkKCiMKIyBDbG9zZSBEYXRhYmFzZSAKIwpkZWYgY2xvc2Vk YigpOgogICAgZ2xvYmFsIGRiCiMgQ29tbWl0IGFsbCBjaGFuZ2VzIGJlZm9yZSBjbG9zaW5nCiAg ICBkYi5jb21taXQoKQogICAgZGIuY2xvc2UoKQoKCgppZiBfX25hbWVfXz09ICdfX21haW5fXyc6 CgojCiMgTWFpbgojCglvcGVuZGIoKQoJcXVlcnkgPSAiU0VMRUNUIHJlbG5hbWUsIHJlbG5hbWVz cGFjZSwgcmVsa2luZCwgcmVsZmlsZW5vZGUsIHJlbHBhZ2VzLCByZWx0b2FzdHJlbGlkLCByZ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