diff options
author | Bruce Momjian | 2013-05-29 20:58:43 +0000 |
---|---|---|
committer | Bruce Momjian | 2013-05-29 20:58:43 +0000 |
commit | 9af4159fce6654aa0e081b00d02bca40b978745c (patch) | |
tree | 3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/include/utils | |
parent | 07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff) |
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update
pgindent instructions.
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/builtins.h | 2 | ||||
-rw-r--r-- | src/include/utils/elog.h | 16 | ||||
-rw-r--r-- | src/include/utils/evtcache.h | 8 | ||||
-rw-r--r-- | src/include/utils/guc_tables.h | 1 | ||||
-rw-r--r-- | src/include/utils/jsonapi.h | 5 | ||||
-rw-r--r-- | src/include/utils/palloc.h | 2 | ||||
-rw-r--r-- | src/include/utils/plancache.h | 10 | ||||
-rw-r--r-- | src/include/utils/rel.h | 33 | ||||
-rw-r--r-- | src/include/utils/reltrigger.h | 1 |
9 files changed, 36 insertions, 42 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 15b60abfcd9..8acdcaaf987 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -576,7 +576,7 @@ extern Datum regexp_split_to_table_no_flags(PG_FUNCTION_ARGS); extern Datum regexp_split_to_array(PG_FUNCTION_ARGS); extern Datum regexp_split_to_array_no_flags(PG_FUNCTION_ARGS); extern char *regexp_fixed_prefix(text *text_re, bool case_insensitive, - Oid collation, bool *exact); + Oid collation, bool *exact); /* regproc.c */ extern Datum regprocin(PG_FUNCTION_ARGS); diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index d5fec89a480..85bd2fdf8a2 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -118,7 +118,7 @@ if (__builtin_constant_p(elevel) && (elevel) >= ERROR) \ pg_unreachable(); \ } while(0) -#else /* !HAVE__BUILTIN_CONSTANT_P */ +#else /* !HAVE__BUILTIN_CONSTANT_P */ #define ereport_domain(elevel, domain, rest) \ do { \ const int elevel_ = (elevel); \ @@ -127,7 +127,7 @@ if (elevel_ >= ERROR) \ pg_unreachable(); \ } while(0) -#endif /* HAVE__BUILTIN_CONSTANT_P */ +#endif /* HAVE__BUILTIN_CONSTANT_P */ #define ereport(elevel, rest) \ ereport_domain(elevel, TEXTDOMAIN, rest) @@ -203,7 +203,7 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2))); * set_errcontext_domain() first sets the domain to be used, and * errcontext_msg() passes the actual message. */ -#define errcontext set_errcontext_domain(TEXTDOMAIN), errcontext_msg +#define errcontext set_errcontext_domain(TEXTDOMAIN), errcontext_msg extern int set_errcontext_domain(const char *domain); extern int @@ -247,7 +247,7 @@ extern int getinternalerrposition(void); if (__builtin_constant_p(elevel) && (elevel) >= ERROR) \ pg_unreachable(); \ } while(0) -#else /* !HAVE__BUILTIN_CONSTANT_P */ +#else /* !HAVE__BUILTIN_CONSTANT_P */ #define elog(elevel, ...) \ do { \ int elevel_; \ @@ -257,12 +257,12 @@ extern int getinternalerrposition(void); if (elevel_ >= ERROR) \ pg_unreachable(); \ } while(0) -#endif /* HAVE__BUILTIN_CONSTANT_P */ -#else /* !HAVE__VA_ARGS */ +#endif /* HAVE__BUILTIN_CONSTANT_P */ +#else /* !HAVE__VA_ARGS */ #define elog \ elog_start(__FILE__, __LINE__, PG_FUNCNAME_MACRO), \ elog_finish -#endif /* HAVE__VA_ARGS */ +#endif /* HAVE__VA_ARGS */ extern void elog_start(const char *filename, int lineno, const char *funcname); extern void @@ -381,7 +381,7 @@ typedef struct ErrorData int lineno; /* __LINE__ of ereport() call */ const char *funcname; /* __func__ of ereport() call */ const char *domain; /* message domain */ - const char *context_domain; /* message domain for context message */ + const char *context_domain; /* message domain for context message */ int sqlerrcode; /* encoded ERRSTATE */ char *message; /* primary error message */ char *detail; /* detail error message */ diff --git a/src/include/utils/evtcache.h b/src/include/utils/evtcache.h index 945e5b53cb8..43c6f61ef5e 100644 --- a/src/include/utils/evtcache.h +++ b/src/include/utils/evtcache.h @@ -25,10 +25,10 @@ typedef enum typedef struct { - Oid fnoid; /* function to be called */ - char enabled; /* as SESSION_REPLICATION_ROLE_* */ - int ntags; /* number of command tags */ - char **tag; /* command tags in SORTED order */ + Oid fnoid; /* function to be called */ + char enabled; /* as SESSION_REPLICATION_ROLE_* */ + int ntags; /* number of command tags */ + char **tag; /* command tags in SORTED order */ } EventTriggerCacheItem; extern List *EventCacheLookup(EventTriggerEvent event); diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index 7360ce35985..8dcdd4baa1e 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -261,5 +261,4 @@ extern const char *config_enum_lookup_by_value(struct config_enum * record, int extern bool config_enum_lookup_by_name(struct config_enum * record, const char *value, int *retval); - #endif /* GUC_TABLES_H */ diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h index f96e9538cdc..f5ec90427a8 100644 --- a/src/include/utils/jsonapi.h +++ b/src/include/utils/jsonapi.h @@ -31,7 +31,7 @@ typedef enum JSON_TOKEN_FALSE, JSON_TOKEN_NULL, JSON_TOKEN_END, -} JsonTokenType; +} JsonTokenType; /* @@ -86,7 +86,8 @@ typedef struct jsonSemAction json_aelem_action array_element_start; json_aelem_action array_element_end; json_scalar_action scalar; -} jsonSemAction, *JsonSemAction; +} jsonSemAction, + *JsonSemAction; /* * parse_json will parse the string in the lex calling the diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index fc5d6053d2c..420bde7ee4a 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -89,7 +89,7 @@ MemoryContextSwitchTo(MemoryContext context) * allocated in a context, not with malloc(). */ extern char *MemoryContextStrdup(MemoryContext context, const char *string); -#endif /* !FRONTEND */ +#endif /* !FRONTEND */ extern char *pstrdup(const char *in); extern char *pnstrdup(const char *in, Size len); diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index abaf9dc59c7..72f8491eedd 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -61,11 +61,11 @@ * allows the query tree to be discarded easily when it is invalidated. * * Some callers wish to use the CachedPlan API even with one-shot queries - * that have no reason to be saved at all. We therefore support a "oneshot" - * variant that does no data copying or invalidation checking. In this case + * that have no reason to be saved at all. We therefore support a "oneshot" + * variant that does no data copying or invalidation checking. In this case * there are no separate memory contexts: the CachedPlanSource struct and * all subsidiary data live in the caller's CurrentMemoryContext, and there - * is no way to free memory short of clearing that entire context. A oneshot + * is no way to free memory short of clearing that entire context. A oneshot * plan is always treated as unsaved. * * Note: the string referenced by commandTag is not subsidiary storage; @@ -143,8 +143,8 @@ extern CachedPlanSource *CreateCachedPlan(Node *raw_parse_tree, const char *query_string, const char *commandTag); extern CachedPlanSource *CreateOneShotCachedPlan(Node *raw_parse_tree, - const char *query_string, - const char *commandTag); + const char *query_string, + const char *commandTag); extern void CompleteCachedPlan(CachedPlanSource *plansource, List *querytree_list, MemoryContext querytree_context, diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 4b833c5018c..58cc3f7ea1a 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -84,20 +84,15 @@ typedef struct RelationData /* * rd_createSubid is the ID of the highest subtransaction the rel has * survived into; or zero if the rel was not created in the current top - * transaction. This can be now be relied on, whereas previously it - * could be "forgotten" in earlier releases. - * Likewise, rd_newRelfilenodeSubid is the ID of the highest - * subtransaction the relfilenode change has survived into, or zero if not - * changed in the current transaction (or we have forgotten changing it). - * rd_newRelfilenodeSubid can be forgotten when a relation has multiple - * new relfilenodes within a single transaction, with one of them occuring - * in a subsequently aborted subtransaction, e.g. - * BEGIN; - * TRUNCATE t; - * SAVEPOINT save; - * TRUNCATE t; - * ROLLBACK TO save; - * -- rd_newRelfilenode is now forgotten + * transaction. This can be now be relied on, whereas previously it could + * be "forgotten" in earlier releases. Likewise, rd_newRelfilenodeSubid is + * the ID of the highest subtransaction the relfilenode change has + * survived into, or zero if not changed in the current transaction (or we + * have forgotten changing it). rd_newRelfilenodeSubid can be forgotten + * when a relation has multiple new relfilenodes within a single + * transaction, with one of them occuring in a subsequently aborted + * subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t; + * ROLLBACK TO save; -- rd_newRelfilenode is now forgotten */ SubTransactionId rd_createSubid; /* rel was created in current xact */ SubTransactionId rd_newRelfilenodeSubid; /* new relfilenode assigned in @@ -162,7 +157,7 @@ typedef struct RelationData * foreign-table support * * rd_fdwroutine must point to a single memory chunk palloc'd in - * CacheMemoryContext. It will be freed and reset to NULL on a relcache + * CacheMemoryContext. It will be freed and reset to NULL on a relcache * reset. */ @@ -403,15 +398,15 @@ typedef struct StdRdOptions /* * RelationIsScannable - * Currently can only be false for a materialized view which has not been - * populated by its query. This is likely to get more complicated later, - * so use a macro which looks like a function. + * Currently can only be false for a materialized view which has not been + * populated by its query. This is likely to get more complicated later, + * so use a macro which looks like a function. */ #define RelationIsScannable(relation) ((relation)->rd_rel->relispopulated) /* * RelationIsPopulated - * Currently, we don't physically distinguish the "populated" and + * Currently, we don't physically distinguish the "populated" and * "scannable" properties of matviews, but that may change later. * Hence, use the appropriate one of these macros in code tests. */ diff --git a/src/include/utils/reltrigger.h b/src/include/utils/reltrigger.h index aa6df29feff..f8afce5c488 100644 --- a/src/include/utils/reltrigger.h +++ b/src/include/utils/reltrigger.h @@ -70,5 +70,4 @@ typedef struct TriggerDesc bool trig_truncate_after_statement; } TriggerDesc; - #endif /* RELTRIGGER_H */ |