Re: Problem with 7.4.5 and webmin 1.8 in grant function - Mailing list pgsql-performance

From Mark Kirkwood
Subject Re: Problem with 7.4.5 and webmin 1.8 in grant function
Date
Msg-id 421A57D4.2070801@coretech.co.nz
Whole thread Raw
In response to Re: Problem with 7.4.5 and webmin 1.8 in grant function  (Mark Kirkwood <markir@coretech.co.nz>)
List pgsql-performance
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();








pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function
Next
From: Ron Mayer
Date:
Subject: Re: seq scan cache vs. index cache smackdown