2 #----------------------------------------------------------------------
5 # Identifies any manually-assigned OIDs that are used multiple times
6 # in the Postgres catalog data.
8 # While duplicate OIDs would only cause a failure if they appear in
9 # the same catalog, our project policy is that manually assigned OIDs
10 # should be globally unique, to avoid confusion.
12 # Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
13 # Portions Copyright (c) 1994, Regents of the University of California
15 # src/include/catalog/duplicate_oids
17 #----------------------------------------------------------------------
20 use warnings FATAL
=> 'all';
22 # Must run in src/include/catalog
24 chdir $FindBin::RealBin
or die "could not cd to $FindBin::RealBin: $!\n";
26 use lib
"$FindBin::RealBin/../../backend/catalog/";
29 my @input_files = glob("pg_*.h");
31 my $oids = Catalog
::FindAllOidsFromHeaders
(@input_files);
35 foreach my $oid (@
{$oids})
42 foreach my $oid (sort { $a <=> $b } keys %oidcounts)
44 next unless $oidcounts{$oid} > 1;