aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/evtcache.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2013-05-29 16:58:43 -0400
committerBruce Momjian <bruce@momjian.us>2013-05-29 16:58:43 -0400
commit9af4159fce6654aa0e081b00d02bca40b978745c (patch)
tree3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/backend/utils/cache/evtcache.c
parent07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff)
downloadpostgresql-9af4159fce6654aa0e081b00d02bca40b978745c.tar.gz
postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.zip
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/backend/utils/cache/evtcache.c')
-rw-r--r--src/backend/utils/cache/evtcache.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/backend/utils/cache/evtcache.c b/src/backend/utils/cache/evtcache.c
index bbd3ae369d3..2180f2abcc1 100644
--- a/src/backend/utils/cache/evtcache.c
+++ b/src/backend/utils/cache/evtcache.c
@@ -40,7 +40,7 @@ typedef enum
typedef struct
{
- EventTriggerEvent event;
+ EventTriggerEvent event;
List *triggerlist;
} EventTriggerCacheEntry;
@@ -51,7 +51,7 @@ static EventTriggerCacheStateType EventTriggerCacheState = ETCS_NEEDS_REBUILD;
static void BuildEventTriggerCache(void);
static void InvalidateEventCacheCallback(Datum arg,
int cacheid, uint32 hashvalue);
-static int DecodeTextArrayToCString(Datum array, char ***cstringp);
+static int DecodeTextArrayToCString(Datum array, char ***cstringp);
/*
* Search the event cache by trigger event.
@@ -77,12 +77,12 @@ EventCacheLookup(EventTriggerEvent event)
static void
BuildEventTriggerCache(void)
{
- HASHCTL ctl;
- HTAB *cache;
- MemoryContext oldcontext;
- Relation rel;
- Relation irel;
- SysScanDesc scan;
+ HASHCTL ctl;
+ HTAB *cache;
+ MemoryContext oldcontext;
+ Relation rel;
+ Relation irel;
+ SysScanDesc scan;
if (EventTriggerCacheContext != NULL)
{
@@ -96,8 +96,8 @@ BuildEventTriggerCache(void)
else
{
/*
- * This is our first time attempting to build the cache, so we need
- * to set up the memory context and register a syscache callback to
+ * This is our first time attempting to build the cache, so we need to
+ * set up the memory context and register a syscache callback to
* capture future invalidation events.
*/
if (CacheMemoryContext == NULL)
@@ -129,24 +129,24 @@ BuildEventTriggerCache(void)
HASH_ELEM | HASH_FUNCTION | HASH_CONTEXT);
/*
- * Prepare to scan pg_event_trigger in name order. We use an MVCC
- * snapshot to avoid getting inconsistent results if the table is
- * being concurrently updated.
+ * Prepare to scan pg_event_trigger in name order. We use an MVCC
+ * snapshot to avoid getting inconsistent results if the table is being
+ * concurrently updated.
*/
rel = relation_open(EventTriggerRelationId, AccessShareLock);
irel = index_open(EventTriggerNameIndexId, AccessShareLock);
scan = systable_beginscan_ordered(rel, irel, GetLatestSnapshot(), 0, NULL);
/*
- * Build a cache item for each pg_event_trigger tuple, and append each
- * one to the appropriate cache entry.
+ * Build a cache item for each pg_event_trigger tuple, and append each one
+ * to the appropriate cache entry.
*/
for (;;)
{
- HeapTuple tup;
- Form_pg_event_trigger form;
+ HeapTuple tup;
+ Form_pg_event_trigger form;
char *evtevent;
- EventTriggerEvent event;
+ EventTriggerEvent event;
EventTriggerCacheItem *item;
Datum evttags;
bool evttags_isnull;
@@ -257,9 +257,9 @@ static void
InvalidateEventCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
{
/*
- * If the cache isn't valid, then there might be a rebuild in progress,
- * so we can't immediately blow it away. But it's advantageous to do
- * this when possible, so as to immediately free memory.
+ * If the cache isn't valid, then there might be a rebuild in progress, so
+ * we can't immediately blow it away. But it's advantageous to do this
+ * when possible, so as to immediately free memory.
*/
if (EventTriggerCacheState == ETCS_VALID)
{