Skip to content

Commit d747140

Browse files
committed
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
1 parent 4e86efb commit d747140

File tree

654 files changed

+11901
-11388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

654 files changed

+11901
-11388
lines changed

contrib/auto_explain/auto_explain.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2008-2009, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/contrib/auto_explain/auto_explain.c,v 1.4 2009/01/05 13:35:38 tgl Exp $
9+
* $PostgreSQL: pgsql/contrib/auto_explain/auto_explain.c,v 1.5 2009/06/11 14:48:50 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -19,7 +19,7 @@
1919
PG_MODULE_MAGIC;
2020

2121
/* GUC variables */
22-
static int auto_explain_log_min_duration = -1; /* msec or -1 */
22+
static int auto_explain_log_min_duration = -1; /* msec or -1 */
2323
static bool auto_explain_log_analyze = false;
2424
static bool auto_explain_log_verbose = false;
2525
static bool auto_explain_log_nested_statements = false;
@@ -28,21 +28,21 @@ static bool auto_explain_log_nested_statements = false;
2828
static int nesting_level = 0;
2929

3030
/* Saved hook values in case of unload */
31-
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
32-
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
33-
static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
31+
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
32+
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
33+
static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
3434

3535
#define auto_explain_enabled() \
3636
(auto_explain_log_min_duration >= 0 && \
3737
(nesting_level == 0 || auto_explain_log_nested_statements))
3838

39-
void _PG_init(void);
40-
void _PG_fini(void);
39+
void _PG_init(void);
40+
void _PG_fini(void);
4141

4242
static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags);
4343
static void explain_ExecutorRun(QueryDesc *queryDesc,
44-
ScanDirection direction,
45-
long count);
44+
ScanDirection direction,
45+
long count);
4646
static void explain_ExecutorEnd(QueryDesc *queryDesc);
4747

4848

@@ -54,8 +54,8 @@ _PG_init(void)
5454
{
5555
/* Define custom GUC variables. */
5656
DefineCustomIntVariable("auto_explain.log_min_duration",
57-
"Sets the minimum execution time above which plans will be logged.",
58-
"Zero prints all plans. -1 turns this feature off.",
57+
"Sets the minimum execution time above which plans will be logged.",
58+
"Zero prints all plans. -1 turns this feature off.",
5959
&auto_explain_log_min_duration,
6060
-1,
6161
-1, INT_MAX / 1000,
@@ -138,9 +138,9 @@ explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
138138
if (auto_explain_enabled())
139139
{
140140
/*
141-
* Set up to track total elapsed time in ExecutorRun. Make sure
142-
* the space is allocated in the per-query context so it will go
143-
* away at ExecutorEnd.
141+
* Set up to track total elapsed time in ExecutorRun. Make sure the
142+
* space is allocated in the per-query context so it will go away at
143+
* ExecutorEnd.
144144
*/
145145
if (queryDesc->totaltime == NULL)
146146
{
@@ -184,23 +184,23 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
184184
{
185185
if (queryDesc->totaltime && auto_explain_enabled())
186186
{
187-
double msec;
187+
double msec;
188188

189189
/*
190-
* Make sure stats accumulation is done. (Note: it's okay if
191-
* several levels of hook all do this.)
190+
* Make sure stats accumulation is done. (Note: it's okay if several
191+
* levels of hook all do this.)
192192
*/
193193
InstrEndLoop(queryDesc->totaltime);
194194

195195
/* Log plan if duration is exceeded. */
196196
msec = queryDesc->totaltime->total * 1000.0;
197197
if (msec >= auto_explain_log_min_duration)
198198
{
199-
StringInfoData buf;
199+
StringInfoData buf;
200200

201201
initStringInfo(&buf);
202202
ExplainPrintPlan(&buf, queryDesc,
203-
queryDesc->doInstrument && auto_explain_log_analyze,
203+
queryDesc->doInstrument && auto_explain_log_analyze,
204204
auto_explain_log_verbose);
205205

206206
/* Remove last line break */

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