~ubuntu-branches/ubuntu/trusty/postgis/trusty-security

« back to all changes in this revision

Viewing changes to utils/postgis_restore.pl

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-12-11 13:10:34 UTC
  • mfrom: (1.1.9 upstream) (5.2.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20091211131034-wmsz69wxvt95pe5r
Tags: 1.4.0-2
* Upload to unstable.
* Better parameterized debian/rules against postgis $(VERSION).
* Added dblatex and libcunit1-dev among build-deps.
* Added postgis_comments.sql to contrib/ SQL templates.
* Dropping 8.3 support, no more supported for squeeze.
  (closes: #559587)
* Do not stop on error in postrm if the target dir does not exist.
  (closes: #560409)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
my %opclass = ();
56
56
my %ops = ();
57
57
 
 
58
 
 
59
# Old aggregate functions we don't carry any more
 
60
$aggs{"accum"} = 1;
 
61
$aggs{"fastunion"} = 1;
 
62
$aggs{"mem_collect"} = 1;
 
63
 
58
64
# This are old postgis functions which might
59
65
# still be in a dump
60
66
my %obsoleted_function = (
115
121
        'geometry_inter(geometry, geometry)', 1,
116
122
        'geometry_size', 1,
117
123
        'ggeometry_consistent', 1,
118
 
        'create_histogram2d(box3d, integer)', 1,
119
 
        'estimate_histogram2d(histogram2d, box)', 1,
120
124
        'xmin(box2d)', 1,
121
125
        'ymin(box2d)', 1,
122
126
        'xmax(box2d)', 1,
124
128
        'optimistic_overlap', 1,
125
129
        'unite_finalfunc', 1,
126
130
        'numb_sub_objs(geometry)', 1,
127
 
        'truly_inside(geometry, geometry)', 1
 
131
        'truly_inside(geometry, geometry)', 1,
 
132
        'jtsnoop', 1,
 
133
        '_st_asgml(integer, geometry, integer)', 1,
 
134
        'text(boolean)', 1,
 
135
        'st_text(boolean)', 1,
 
136
        'postgis_jts_version', 1,
 
137
        'build_histogram2d', 1,
 
138
        'create_histogram2d', 1,
 
139
        'estimate_histogram2d', 1,
 
140
        'explode_histogram2d', 1,
 
141
        'histogram2d_in', 1,
 
142
        'histogram2d_out', 1,
 
143
        'st_histogram2d_in', 1,
 
144
        'st_histogram2d_out', 1,
 
145
        'st_build_histogram2d', 1,
 
146
        'st_create_histogram2d', 1,
 
147
        'st_estimate_histogram2d', 1,
 
148
        'st_explode_histogram2d', 1
128
149
);
129
150
 
130
151
# This are old postgis operators which might
273
294
                }
274
295
                next;
275
296
        }
276
 
        if ($line =~ /^create aggregate *([^ ]*) *\(/i)
 
297
        if ( $line =~ /^create aggregate *([^ ]*) *\(/i )
277
298
        {
278
299
                my $name = lc($1);
279
300
                $name =~ s/^public.//;
280
301
                my $type = undef;
281
302
                while( my $subline = <INPUT>)
282
303
                {
283
 
                        if ( $subline =~ /basetype .* ([^, ]*)/ )
 
304
                        if ( $subline =~ /basetype .* ([^, ]*)/i )
284
305
                        {
285
306
                                $type = $1;
286
307
                                last;
486
507
                        next;
487
508
                }
488
509
 
 
510
                # This is an old postgis aggregate
 
511
                if ( $name eq 'accum' )
 
512
                {
 
513
                        print "SKIPPING old PGIS AGG $id\n" if $DEBUG;
 
514
                        next;
 
515
                }
489
516
                print "KEEPING AGGREGATE [$id]\n" if $DEBUG;
490
517
                #next;
491
518
        }
607
634
        } # CAST
608
635
 
609
636
        print OUTPUT $line;
610
 
#       print "UNANDLED: $line"
 
637
#       print "UNHANDLED: $line"
611
638
}
612
639
close( INPUT );
613
640
close(OUTPUT);