[rt-users] Make initialize-database with Postgresql

Peer Michael Michael.Peer at eurac.edu
Fri Sep 5 05:41:32 EDT 2008


Hi

Today I want create a fresh rt-database. When I run make
initialize-database I get the follow error: invalid privilege type USAGE
for table.
The error comes from the acl.Pg file, that contains the following code: 
    foreach my $table (@tables) {
        if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
# table like objectcustomfields_id_s
            push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO
$db_user;"
        }
        else {
            push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table
TO $db_user;
        }
    }
    return (@acls);
}

1;



My current installation is:
Rt-3.8.1
Postgresql-8.1.9-1
perl-5.8.8-10


I checked the postgresql installation and compared the schemas without
success. I've been able to run "make initialize-database" by commenting
the following:
--- /opt/rt3/etc/acl.Pg     2008-09-05 11:34:12.000000000 +0200
+++ /root/rt-3.8.1/etc/acl.Pg   2008-09-05 11:00:49.000000000 +0200
@@ -58,13 +58,13 @@
     }

     foreach my $table (@tables) {
-        if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
+#        if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
 # table like objectcustomfields_id_s
-            push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO
$db_user;"
-        }
-        else {
+#            push @acls, "GRANT USAGE, SELECT, UPDATE ON $table TO
$db_user;"
+#        }
+#        else {
             push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table
TO $db_user;"
-        }
+#        }
     }
     return (@acls);
 }


What impact does these changes have? Do the current code need the newer
postgresql?

Any help is appreciated.

Regards Michael Peer





More information about the rt-users mailing list