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


#!/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();







---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to