Don't CASCADE on TRUNCATE, not available in old versions of Postgres.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 2 Mar 2008 16:41:29 +0000 (16:41 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 2 Mar 2008 16:41:29 +0000 (16:41 +0000)
maintenance/postgres/mediawiki_mysql2postgres.pl

index 8a3bb2c..eb87eeb 100644 (file)
@@ -9,7 +9,6 @@
 ## If having UTF-8 problems, there are reports that adding --compatible=postgresql
 ## may help.
 
 ## If having UTF-8 problems, there are reports that adding --compatible=postgresql
 ## may help.
 
-
 use strict;
 use warnings;
 use Data::Dumper;
 use strict;
 use warnings;
 use Data::Dumper;
@@ -275,7 +274,7 @@ $verbose and warn qq{Writing truncates to empty existing tables\n};
 for my $t (@torder, 'objectcache', 'querycache') {
        next if $t eq '---';
        my $tname = $special{$t}||$t;
 for my $t (@torder, 'objectcache', 'querycache') {
        next if $t eq '---';
        my $tname = $special{$t}||$t;
-       printf qq{TRUNCATE TABLE %-20s CASCADE;\n}, qq{"$tname"};
+       printf qq{TRUNCATE TABLE %-20s\n}, qq{"$tname"};
 }
 print "\n\n";
 
 }
 print "\n\n";