From: Mark Kirkwood <markir@coretech.co.nz>
To: Mark Kirkwood <markir@coretech.co.nz>
Cc: amrit@health2.moph.go.th, PGsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function
Date: Tue, 22 Feb 2005 10:51:16 +1300
Message-ID: <421A57D4.2070801@coretech.co.nz> (raw)
In-Reply-To: <421A4F96.60803@coretech.co.nz>
References: <1108914570.4218b18a2cf0d@webmail.moph.go.th>
<42191623.7060401@coretech.co.nz>
<1108949685.42193ab53e07c@webmail.moph.go.th>
<421A4F96.60803@coretech.co.nz>
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
Attachments:relacl.pl (text/plain, 723B) download
#!/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();
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: markir@coretech.co.nz
Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function
In-Reply-To: <421A57D4.2070801@coretech.co.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox