X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D62C78B9B3E for ; Mon, 21 Feb 2005 21:51:28 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13939-09 for ; Mon, 21 Feb 2005 21:51:18 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id 3E21E8B9B64 for ; Mon, 21 Feb 2005 21:51:18 +0000 (GMT) Received: (qmail 5579 invoked from network); 21 Feb 2005 21:51:17 -0000 Received: from 218-101-14-65.paradise.net.nz (HELO ?192.168.1.11?) (218.101.14.65) by 0 with SMTP; 21 Feb 2005 21:51:17 -0000 Message-ID: <421A57D4.2070801@coretech.co.nz> Date: Tue, 22 Feb 2005 10:51:16 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kirkwood Cc: amrit@health2.moph.go.th, PGsql-performance Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function References: <1108914570.4218b18a2cf0d@webmail.moph.go.th> <42191623.7060401@coretech.co.nz> <1108949685.42193ab53e07c@webmail.moph.go.th> <421A4F96.60803@coretech.co.nz> In-Reply-To: <421A4F96.60803@coretech.co.nz> Content-Type: multipart/mixed; boundary="------------090803040403050609020905" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/290 X-Sequence-Number: 10619 This is a multi-part message in MIME format. --------------090803040403050609020905 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mark Kirkwood wrote: > If on the other hand you can do *some* Pg admin from webmin, and you are > only having problems with the grants then there is something it does not > like about the *particular* statement. The way to debug this is to do a > tiny perl DBI program that tries to execute the statement : > > select relname, relacl from pg_class where (relkind = 'r' OR relkind = > 'S') and relname !~ '^pg_' order by relname > I did a quick check of this case... seems to be no problem running this statement using perl 5.8.5, DBI-1.42 and DBD-Pg-1.22. You might like to try out the attached test program that does this (You may have to add a password in order to connect, depending on your security settings). Mark --------------090803040403050609020905 Content-Type: text/plain; name="relacl.pl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="relacl.pl" #!/usr/bin/perl -w # # relacl.pl : testbed for # use DBI; use strict; my $db = "dbname=template1;port=5432"; my $user = "postgres"; my $pwd = ""; my $dsn = "DBI:Pg:$db"; my $con; my $sql = "select relname, relacl from pg_class where " . "(relkind = 'r' OR relkind = 'S') and relname !~ '^pg_' " . "order by relname"; my $sth; my @row; $con = DBI->connect($dsn,$user,$pwd) or die "Error in connect to $dsn: $!\n"; $sth = $con->prepare($sql) or die "Error in prepare : $!"; $sth->execute() or die "Error in execute : $!"; print "Relname\t\tRelacl\n"; while ( @row = $sth->fetchrow_array() ) { print $row[0] . "\t" . $row[1] . "\n"; } $sth->finish(); $con->disconnect(); --------------090803040403050609020905--