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/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy