Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce55481

Browse files
committed
Post-PG 10 beta1 pgperltidy run
1 parenta6fd7b7 commitce55481

File tree

66 files changed

+1872
-1187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1872
-1187
lines changed

‎contrib/intarray/bench/bench.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292

9393
if ($opt{e})
9494
{
95-
my@plan =map {"$_->[0]\n" } @{$dbi->selectall_arrayref("explain$sql")};
95+
my@plan =
96+
map {"$_->[0]\n" } @{$dbi->selectall_arrayref("explain$sql") };
9697
print@plan;
9798
}
9899

‎src/backend/catalog/Catalog.pm

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@ sub Catalogs
8080
{
8181
$catalog{natts} =$1;
8282
}
83-
elsif (/^DATA\(insert(\s+OID\s+=\s+(\d+))?\s+\(\s*(.*)\s*\)\s*\)$/)
83+
elsif (
84+
/^DATA\(insert(\s+OID\s+=\s+(\d+))?\s+\(\s*(.*)\s*\)\s*\)$/)
8485
{
85-
check_natts($filename,$catalog{natts},$3,
86-
$input_file,$input_line_number);
86+
check_natts($filename,$catalog{natts},$3,$input_file,
87+
$input_line_number);
8788

8889
push @{$catalog{data} }, {oid=>$2,bki_values=>$3 };
8990
}
@@ -256,14 +257,15 @@ sub check_natts
256257
{
257258
my ($catname,$natts,$bki_val,$file,$line) =@_;
258259

259-
die"Could not find definition for Natts_${catname} before start of DATA() in$file\n"
260-
unlessdefined$natts;
260+
die
261+
"Could not find definition for Natts_${catname} before start of DATA() in$file\n"
262+
unlessdefined$natts;
261263

262264
my$nfields =scalar(SplitDataLine($bki_val));
263265

264266
diesprintf
265-
"Wrong number of attributes in DATA() entry at%s:%d (expected%d but got%d)\n",
266-
$file,$line,$natts,$nfields
267+
"Wrong number of attributes in DATA() entry at%s:%d (expected%d but got%d)\n",
268+
$file,$line,$natts,$nfields
267269
unless$natts ==$nfields;
268270
}
269271

‎src/backend/catalog/genbki.pl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,13 @@
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
foreachmy$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/\bPGUID\b/$BOOTSTRAP_SUPERUSERID/g;
@@ -178,23 +180,23 @@
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-
ifdefined($procoid) &&$procoidne'MULTIPLE';
185+
ifdefined($procoid) &&$procoidne'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 ($catnameeq'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

@@ -211,7 +213,7 @@
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\t0\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.

‎src/backend/parser/check_keywords.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ sub error
149149

150150
# Now read in kwlist.h
151151

152-
open(my$kwlist,'<',$kwlist_filename) ||die("Could not open :$kwlist_filename");
152+
open(my$kwlist,'<',$kwlist_filename)
153+
||die("Could not open :$kwlist_filename");
153154

154155
my$prevkwstring ='';
155156
my$bare_kwname;

‎src/backend/utils/Gen_fmgrtab.pl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
my$data =$catalogs->{pg_proc}->{data};
5959
foreachmy$row (@$data)
6060
{
61+
6162
# Split line into tokens without interpreting their meaning.
6263
my%bki_values;
6364
@bki_values{@attnames} = Catalog::SplitDataLine($row->{bki_values});
@@ -75,14 +76,17 @@
7576
}
7677

7778
# Emit headers for both files
78-
my$tmpext =".tmp$$";
79-
my$oidsfile =$output_path .'fmgroids.h';
79+
my$tmpext=".tmp$$";
80+
my$oidsfile=$output_path .'fmgroids.h';
8081
my$protosfile =$output_path .'fmgrprotos.h';
81-
my$tabfile =$output_path .'fmgrtab.c';
82+
my$tabfile=$output_path .'fmgrtab.c';
8283

83-
openmy$ofh,'>',$oidsfile .$tmpextordie"Could not open$oidsfile$tmpext:$!";
84-
openmy$pfh,'>',$protosfile .$tmpextordie"Could not open$protosfile$tmpext:$!";
85-
openmy$tfh,'>',$tabfile .$tmpextordie"Could not open$tabfile$tmpext:$!";
84+
openmy$ofh,'>',$oidsfile .$tmpext
85+
ordie"Could not open$oidsfile$tmpext:$!";
86+
openmy$pfh,'>',$protosfile .$tmpext
87+
ordie"Could not open$protosfile$tmpext:$!";
88+
openmy$tfh,'>',$tabfile .$tmpext
89+
ordie"Could not open$tabfile$tmpext:$!";
8690

8791
print$ofh
8892
qq|/*-------------------------------------------------------------------------
@@ -218,9 +222,9 @@
218222
close($tfh);
219223

220224
# Finally, rename the completed files into place.
221-
Catalog::RenameTempFile($oidsfile,$tmpext);
225+
Catalog::RenameTempFile($oidsfile,$tmpext);
222226
Catalog::RenameTempFile($protosfile,$tmpext);
223-
Catalog::RenameTempFile($tabfile,$tmpext);
227+
Catalog::RenameTempFile($tabfile,$tmpext);
224228

225229
subusage
226230
{

‎src/backend/utils/mb/Unicode/UCS_to_BIG5.pl

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@
3535
# Load CP950.TXT
3636
my$cp950txt = &read_source("CP950.TXT");
3737

38-
foreachmy$i (@$cp950txt) {
38+
foreachmy$i (@$cp950txt)
39+
{
3940
my$code =$i->{code};
40-
my$ucs =$i->{ucs};
41+
my$ucs=$i->{ucs};
4142

4243
# Pick only the ETEN extended characters in the range 0xf9d6 - 0xf9dc
4344
# from CP950.TXT
@@ -46,22 +47,24 @@
4647
&&$code >= 0xf9d6
4748
&&$code <= 0xf9dc)
4849
{
49-
push@$all, {code=>$code,
50-
ucs=>$ucs,
51-
comment=>$i->{comment},
52-
direction=> BOTH,
53-
f=>$i->{f},
54-
l=>$i->{l} };
50+
push@$all,
51+
{code=>$code,
52+
ucs=>$ucs,
53+
comment=>$i->{comment},
54+
direction=> BOTH,
55+
f=>$i->{f},
56+
l=>$i->{l} };
5557
}
5658
}
5759

58-
foreachmy$i (@$all) {
60+
foreachmy$i (@$all)
61+
{
5962
my$code =$i->{code};
60-
my$ucs =$i->{ucs};
63+
my$ucs=$i->{ucs};
6164

62-
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
63-
# contain only one of them. XXX: Doesn't really make sense to include any of them,
64-
# but for historical reasons, we map the first one of them.
65+
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
66+
# contain only one of them. XXX: Doesn't really make sense to include any of them,
67+
# but for historical reasons, we map the first one of them.
6568
if ($i->{ucs} == 0xFFFD &&$i->{code} != 0xA15A)
6669
{
6770
$i->{direction} = TO_UNICODE;

‎src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838
# a lot of extra characters on top of the GB2312 character set that
3939
# EUC_CN encodes. Filter out those extra characters.
4040
nextif (($code & 0xFF) < 0xA1);
41-
nextif (!($code >= 0xA100 &&$code <= 0xA9FF ||
42-
$code >= 0xB000 &&$code <= 0xF7FF));
41+
next
42+
if (
43+
!($code >= 0xA100 &&$code <= 0xA9FF
44+
||$code >= 0xB000 &&$code <= 0xF7FF));
4345

4446
nextif ($code >= 0xA2A1 &&$code <= 0xA2B0);
4547
nextif ($code >= 0xA2E3 &&$code <= 0xA2E4);
@@ -67,13 +69,12 @@
6769
$ucs = 0x2015;
6870
}
6971

70-
push@mapping, {
71-
ucs=>$ucs,
72-
code=>$code,
72+
push@mapping,
73+
{ucs=>$ucs,
74+
code=>$code,
7375
direction=> BOTH,
74-
f=>$in_file,
75-
l=>$.
76-
};
76+
f=>$in_file,
77+
l=>$. };
7778
}
7879
close($in);
7980

‎src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,40 @@
2424
{
2525
if ($line =~/^0x(.*)[\t]*U\+(.*)\+(.*)[\t]*#(.*)$/)
2626
{
27+
2728
# combined characters
2829
my ($c,$u1,$u2) = ($1,$2,$3);
2930
my$rest ="U+" .$u1 ."+" .$u2 .$4;
3031
my$code =hex($c);
3132
my$ucs1 =hex($u1);
3233
my$ucs2 =hex($u2);
3334

34-
push@all, {direction=> BOTH,
35-
ucs=>$ucs1,
36-
ucs_second=>$ucs2,
37-
code=>$code,
38-
comment=>$rest,
39-
f=>$in_file,
40-
l=>$.
41-
};
35+
push@all,
36+
{direction=>BOTH,
37+
ucs=>$ucs1,
38+
ucs_second=>$ucs2,
39+
code=>$code,
40+
comment=>$rest,
41+
f=>$in_file,
42+
l=>$.};
4243
}
4344
elsif ($line =~/^0x(.*)[\t]*U\+(.*)[\t]*#(.*)$/)
4445
{
46+
4547
# non-combined characters
4648
my ($c,$u,$rest) = ($1,$2,"U+" .$2 .$3);
4749
my$ucs =hex($u);
4850
my$code =hex($c);
4951

5052
nextif ($code < 0x80 &&$ucs < 0x80);
5153

52-
push@all, {direction=> BOTH,
53-
ucs=>$ucs,
54-
code=>$code,
55-
comment=>$rest,
56-
f=>$in_file,
57-
l=>$.
58-
};
54+
push@all,
55+
{direction=>BOTH,
56+
ucs=>$ucs,
57+
code=>$code,
58+
comment=>$rest,
59+
f=>$in_file,
60+
l=>$.};
5961
}
6062
}
6163
close($in);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp