Skip to content

Commit 183a60a

Browse files
committed
Remove double quotes from the second column of wait_event_names.txt
The double quotes used for the wait event names are not required, as the values quoted are made of single words. The files generated by generate-wait_event_types.pl (pgstat_wait_event.c, wait_event_types.h and wait_event_types.sgml) are exactly the same before and after this commit, hence the wait event names and the enum elements have the same names as before. Discussion: https://postgr.es/m/ZK9S3jFEV1X797Ll@paquier.xyz
1 parent c66a7d7 commit 183a60a

File tree

2 files changed

+251
-249
lines changed

2 files changed

+251
-249
lines changed

src/backend/utils/activity/generate-wait_event_types.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
foreach my $line (@lines_sorted)
7474
{
7575
die "unable to parse wait_event_names.txt"
76-
unless $line =~ /^(\w+)\t+(\w+)\t+("\w+")\t+("\w.*\.")$/;
76+
unless $line =~ /^(\w+)\t+(\w+)\t+(\w+)\t+("\w.*\.")$/;
7777

7878
( my $waitclassname,
7979
my $waiteventenumname,
@@ -168,7 +168,9 @@
168168
$firstpass = 0;
169169

170170
printf $c "\t\t case %s:\n", $wev->[0];
171-
printf $c "\t\t\t event_name = %s;\n\t\t\t break;\n", $wev->[1];
171+
# Apply quotes to the wait event name string.
172+
printf $c "\t\t\t event_name = \"%s\";\n\t\t\t break;\n",
173+
$wev->[1];
172174
}
173175

174176
printf $h "\n} $waitclass;\n\n";
@@ -221,7 +223,7 @@
221223
{
222224
printf $s " <row>\n";
223225
printf $s " <entry><literal>%s</literal></entry>\n",
224-
substr $wev->[1], 1, -1;
226+
$wev->[1];
225227
printf $s " <entry>%s</entry>\n", substr $wev->[2], 1, -1;
226228
printf $s " </row>\n";
227229
}

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