Skip to content
Snippets Groups Projects
Commit 409de6be authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Re-add brace removal code but comment it out so we know why we removed

it and have it in case we need it for some special case.
parent 47402a9b
No related branches found
No related tags found
No related merge requests found
...@@ -1742,6 +1742,35 @@ do ...@@ -1742,6 +1742,35 @@ do
sed 's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;' | sed 's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;' |
# move trailing * in function return type # move trailing * in function return type
sed 's;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;' | sed 's;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;' |
# remove un-needed braces around single statements
# Do not use because it uglifies PG_TRY/PG_CATCH blocks and probably
# isn't needed for general use.
# awk '
# {
# line3 = $0;
# if (skips > 0)
# skips--;
# if (line1 ~ " *{$" &&
# line2 ~ " *[^;{}]*;$" &&
# line3 ~ " *}$")
# {
# print line2;
# line2 = "";
# line3 = "";
# skips = 3;
# }
# else
# if (skips == 0 && NR >= 3)
# print line1;
# line1 = line2;
# line2 = line3;
# }
# END {
# if (NR >= 2 && skips <= 1)
# print line1;
# if (NR >= 1 && skips <= 2)
# print line2;
# }' |
# remove blank line between opening brace and block comment # remove blank line between opening brace and block comment
awk ' awk '
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment