blob: f3d1136a35e5f53db56f9240e5156d18c8da8881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/perl
use strict;
use warnings;
BEGIN
{
@ARGV = (glob("pg_*.h"), qw(indexing.h toasting.h));
}
my %oidcounts;
while(<>)
{
next if /^CATALOG\(.*BKI_BOOTSTRAP/;
next unless
/^DATA\(insert *OID *= *(\d+)/ ||
/^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+)\)/ ||
/^CATALOG\([^,]*, *(\d+)/ ||
/^DECLARE_INDEX\([^,]*, *(\d+)/ ||
/^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/ ||
/^DECLARE_TOAST\([^,]*, *(\d+), *(\d+)/;
$oidcounts{$1}++;
$oidcounts{$2}++ if $2;
}
my $found = 0;
foreach my $oid (sort {$a <=> $b} keys %oidcounts)
{
next unless $oidcounts{$oid} > 1;
$found = 1;
print "$oid\n";
}
exit $found;
|