Browse Source

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
master
Tom Lane 1 month ago
parent
commit
f859c2ffa0
4 changed files with 8 additions and 7 deletions
  1. +4
    -3
      src/backend/utils/sort/gen_qsort_tuple.pl
  2. +1
    -1
      src/pl/plpgsql/src/generate-plerrcodes.pl
  3. +2
    -2
      src/pl/plpython/generate-spiexceptions.pl
  4. +1
    -1
      src/pl/tcl/generate-pltclerrcodes.pl

+ 4
- 3
src/backend/utils/sort/gen_qsort_tuple.pl View File

@ -115,7 +115,8 @@ swapfunc(SortTuple *a, SortTuple *b, size_t n)
{
do
{
SortTuple t = *a;
SortTuple t = *a;
*a++ = *b;
*b++ = t;
} while (--n > 0);
@ -143,9 +144,9 @@ med3_$SUFFIX(SortTuple *a, SortTuple *b, SortTuple *c$EXTRAARGS)
{
return cmp_$SUFFIX(a, b$CMPPARAMS) < 0 ?
(cmp_$SUFFIX(b, c$CMPPARAMS) < 0 ? b :
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? c : a))
: (cmp_$SUFFIX(b, c$CMPPARAMS) > 0 ? b :
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
(cmp_$SUFFIX(a, c$CMPPARAMS) < 0 ? a : c));
}
static void

+ 1
- 1
src/pl/plpgsql/src/generate-plerrcodes.pl View File

@ -34,7 +34,7 @@ while (<$errcodes>)
# Skip lines without PL/pgSQL condition names
next unless defined($condition_name);
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
}
close $errcodes;

+ 2
- 2
src/pl/plpython/generate-spiexceptions.pl View File

@ -37,8 +37,8 @@ while (<$errcodes>)
# Change some_error_condition to SomeErrorCondition
$condition_name =~ s/([a-z])([^_]*)(?:_|$)/\u$1$2/g;
print "{ \"spiexceptions.$condition_name\", "
. "\"$condition_name\", $errcode_macro },\n";
print "\n{\n\t\"spiexceptions.$condition_name\", "
. "\"$condition_name\", $errcode_macro\n},\n";
}
close $errcodes;

+ 1
- 1
src/pl/tcl/generate-pltclerrcodes.pl View File

@ -34,7 +34,7 @@ while (<$errcodes>)
# Skip lines without PL/pgSQL condition names
next unless defined($condition_name);
print "{\n\t\"$condition_name\", $errcode_macro\n},\n\n";
print "\n{\n\t\"$condition_name\", $errcode_macro\n},\n";
}
close $errcodes;

Loading…
Cancel
Save