163163
164164 # Split line into tokens without interpreting their meaning.
165165 my %bki_values ;
166- @bki_values {@attnames } = Catalog::SplitDataLine($row -> {bki_values });
166+ @bki_values {@attnames } =
167+ Catalog::SplitDataLine($row -> {bki_values });
167168
168169 # Perform required substitutions on fields
169170 foreach my $att (keys %bki_values )
170171 {
172+
171173 # Substitute constant values we acquired above.
172174 # (It's intentional that this can apply to parts of a field).
173175 $bki_values {$att } =~ s /\b PGUID\b / $BOOTSTRAP_SUPERUSERID / g ;
178180 # just do nothing (regprocin will complain).
179181 if ($bki_attr {$att }-> {type } eq ' regproc' )
180182 {
181- my $procoid = $regprocoids {$bki_values {$att }};
183+ my $procoid = $regprocoids { $bki_values {$att } };
182184 $bki_values {$att } = $procoid
183- if defined ($procoid ) && $procoid ne ' MULTIPLE' ;
185+ if defined ($procoid ) && $procoid ne ' MULTIPLE' ;
184186 }
185187 }
186188
187189 # Save pg_proc oids for use in later regproc substitutions.
188190 # This relies on the order we process the files in!
189191 if ($catname eq ' pg_proc' )
190192 {
191- if (defined ($regprocoids {$bki_values {proname }}))
193+ if (defined ($regprocoids { $bki_values {proname } }))
192194 {
193- $regprocoids {$bki_values {proname }} = ' MULTIPLE' ;
195+ $regprocoids { $bki_values {proname } } = ' MULTIPLE' ;
194196 }
195197 else
196198 {
197- $regprocoids {$bki_values {proname }} = $row -> {oid };
199+ $regprocoids { $bki_values {proname } } = $row -> {oid };
198200 }
199201 }
200202
211213 printf $bki " insert %s ( %s )\n " , $oid ,
212214 join (' ' , @bki_values {@attnames });
213215
214- # Write comments to postgres.description and postgres.shdescription
216+ # Write comments to postgres.description and postgres.shdescription
215217 if (defined $row -> {descr })
216218 {
217219 printf $descr " %s \t %s \t 0\t %s \n " , $row -> {oid }, $catname ,
@@ -459,7 +461,8 @@ sub bki_insert
459461 my $row = shift ;
460462 my @attnames = @_ ;
461463 my $oid = $row -> {oid } ? " OID = $row ->{oid} " : ' ' ;
462- my $bki_values = join ' ' , map { $_ eq ' ' ? ' ""' : $_ } map $row -> {$_ }, @attnames ;
464+ my $bki_values = join ' ' , map { $_ eq ' ' ? ' ""' : $_ } map $row -> {$_ },
465+ @attnames ;
463466 printf $bki " insert %s ( %s )\n " , $oid , $bki_values ;
464467}
465468
@@ -474,9 +477,9 @@ sub emit_schemapg_row
474477 $row -> {attidentity } ||= ' \0' ;
475478
476479 # Supply appropriate quoting for these fields.
477- $row -> {attname } = q| {"| . $row -> {attname } . q| "}| ;
478- $row -> {attstorage } = q| '| . $row -> {attstorage } . q| '| ;
479- $row -> {attalign } = q| '| . $row -> {attalign } . q| '| ;
480+ $row -> {attname } = q| {"| . $row -> {attname } . q| "}| ;
481+ $row -> {attstorage } = q| '| . $row -> {attstorage } . q| '| ;
482+ $row -> {attalign } = q| '| . $row -> {attalign } . q| '| ;
480483 $row -> {attidentity } = q| '| . $row -> {attidentity } . q| '| ;
481484
482485 # We don't emit initializers for the variable length fields at all.
0 commit comments