Skip to content

Commit f859c2f

Browse files
committed
Fix a few more generator scripts to produce pgindent-clean output.
This completes the project of making all our derived files be pgindent-clean (or else explicitly excluded from indentation), so that no surprises result when running pgindent in a built-out development tree. Discussion: https://postgr.es/m/[email protected]
1 parent 9436041 commit f859c2f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/backend/utils/sort/gen_qsort_tuple.pl

+4-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ sub emit_qsort_boilerplate
115115
{
116116
do
117117
{
118-
SortTuple t = *a;
118+
SortTuple t = *a;
119+
119120
*a++ = *b;
120121
*b++ = t;
121122
} while (--n > 0);
@@ -143,9 +144,9 @@ sub emit_qsort_implementation
143144
{
144145
return cmp_$SUFFIX(a, b$CMPPARAMS) < 0 ?
145146
(cmp_$SUFFIX(b, c$CMPPARAMS) < 0 ? b :
146-
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
147+
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
147148
: (cmp_$SUFFIX(b, c$CMPPARAMS) > 0 ? b :
148-
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
149+
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
149150
}
150151
151152
static void

src/pl/plpgsql/src/generate-plerrcodes.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# Skip lines without PL/pgSQL condition names
3535
next unless defined($condition_name);
3636

37-
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
37+
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
3838
}
3939

4040
close $errcodes;

src/pl/plpython/generate-spiexceptions.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
# Change some_error_condition to SomeErrorCondition
3838
$condition_name =~ s/([a-z])([^_]*)(?:_|$)/\u$1$2/g;
3939

40-
print "{ \"spiexceptions.$condition_name\", "
41-
. "\"$condition_name\", $errcode_macro },\n";
40+
print "\n{\n\t\"spiexceptions.$condition_name\", "
41+
. "\"$condition_name\", $errcode_macro\n},\n";
4242
}
4343

4444
close $errcodes;

src/pl/tcl/generate-pltclerrcodes.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# Skip lines without PL/pgSQL condition names
3535
next unless defined($condition_name);
3636

37-
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
37+
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
3838
}
3939

4040
close $errcodes;

0 commit comments

Comments
 (0)