[postgis-commits] svn - r3675 - trunk/utils
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Mon Feb 9 15:51:42 PST 2009
Author: pramsey
Date: 2009-02-09 15:51:30 -0800 (Mon, 09 Feb 2009)
New Revision: 3675
Modified:
trunk/utils/postgis_restore.pl
Log:
Fix case sensitive in AGGREGATE reading.
Modified: trunk/utils/postgis_restore.pl
===================================================================
--- trunk/utils/postgis_restore.pl 2009-02-09 18:23:40 UTC (rev 3674)
+++ trunk/utils/postgis_restore.pl 2009-02-09 23:51:30 UTC (rev 3675)
@@ -55,6 +55,12 @@
my %opclass = ();
my %ops = ();
+
+# Old aggregate functions we don't carry any more
+$aggs{"accum"} = 1;
+$aggs{"fastunion"} = 1;
+$aggs{"mem_collect"} = 1;
+
# This are old postgis functions which might
# still be in a dump
my %obsoleted_function = (
@@ -273,14 +279,14 @@
}
next;
}
- if ($line =~ /^create aggregate *([^ ]*) *\(/i)
+ if ( $line =~ /^create aggregate *([^ ]*) *\(/i )
{
my $name = lc($1);
$name =~ s/^public.//;
my $type = undef;
while( my $subline = <INPUT>)
{
- if ( $subline =~ /basetype .* ([^, ]*)/ )
+ if ( $subline =~ /basetype .* ([^, ]*)/i )
{
$type = $1;
last;
@@ -486,6 +492,12 @@
next;
}
+ # This is an old postgis aggregate
+ if ( $name eq 'accum' )
+ {
+ print "SKIPPING old PGIS AGG $id\n" if $DEBUG;
+ next;
+ }
print "KEEPING AGGREGATE [$id]\n" if $DEBUG;
#next;
}
@@ -607,7 +619,7 @@
} # CAST
print OUTPUT $line;
-# print "UNANDLED: $line"
+# print "UNHANDLED: $line"
}
close( INPUT );
close(OUTPUT);
More information about the postgis-commits
mailing list