aboutsummaryrefslogtreecommitdiff
path: root/src/backend/rewrite/locks.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-09-08 02:41:22 +0000
committerBruce Momjian <bruce@momjian.us>1997-09-08 02:41:22 +0000
commit319dbfa7364721d3343af03a7ce063c2a2c9d385 (patch)
treea2146fe02c49ce1e497b7c287dfcaa367a703ae4 /src/backend/rewrite/locks.c
parenta90f12fd9d6886da4f0734288496361a304d3882 (diff)
downloadpostgresql-319dbfa7364721d3343af03a7ce063c2a2c9d385.tar.gz
postgresql-319dbfa7364721d3343af03a7ce063c2a2c9d385.zip
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
Diffstat (limited to 'src/backend/rewrite/locks.c')
-rw-r--r--src/backend/rewrite/locks.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/backend/rewrite/locks.c b/src/backend/rewrite/locks.c
index 213fae9b321..6a62e8ddee3 100644
--- a/src/backend/rewrite/locks.c
+++ b/src/backend/rewrite/locks.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.3 1997/09/07 04:48:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.4 1997/09/08 02:28:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,52 +26,52 @@
* if we find at least one such match, we return true
* otherwise, we return false
*/
-static bool
+static bool
nodeThisLockWasTriggered(Node * node, int varno, AttrNumber attnum)
{
if (node == NULL)
return FALSE;
switch (nodeTag(node))
{
- case T_Var:
- {
- Var *var = (Var *) node;
-
- if (varno == var->varno &&
- (attnum == var->varattno || attnum == -1))
- return TRUE;
- }
- break;
- case T_Expr:
- {
- Expr *expr = (Expr *) node;
+ case T_Var:
+ {
+ Var *var = (Var *) node;
- return
- nodeThisLockWasTriggered((Node *) expr->args, varno, attnum);
- }
- break;
- case T_TargetEntry:
- {
- TargetEntry *tle = (TargetEntry *) node;
+ if (varno == var->varno &&
+ (attnum == var->varattno || attnum == -1))
+ return TRUE;
+ }
+ break;
+ case T_Expr:
+ {
+ Expr *expr = (Expr *) node;
- return
- nodeThisLockWasTriggered(tle->expr, varno, attnum);
- }
- break;
- case T_List:
- {
- List *l;
+ return
+ nodeThisLockWasTriggered((Node *) expr->args, varno, attnum);
+ }
+ break;
+ case T_TargetEntry:
+ {
+ TargetEntry *tle = (TargetEntry *) node;
- foreach(l, (List *) node)
+ return
+ nodeThisLockWasTriggered(tle->expr, varno, attnum);
+ }
+ break;
+ case T_List:
{
- if (nodeThisLockWasTriggered(lfirst(l), varno, attnum))
- return TRUE;
+ List *l;
+
+ foreach(l, (List *) node)
+ {
+ if (nodeThisLockWasTriggered(lfirst(l), varno, attnum))
+ return TRUE;
+ }
+ return FALSE;
}
- return FALSE;
- }
- break;
- default:
- break;
+ break;
+ default:
+ break;
}
return (FALSE);
}
@@ -82,7 +82,7 @@ nodeThisLockWasTriggered(Node * node, int varno, AttrNumber attnum)
* against the attnum if we find at least one such match, we return true
* otherwise, we return false
*/
-static bool
+static bool
thisLockWasTriggered(int varno,
AttrNumber attnum,
Query * parsetree)
@@ -97,15 +97,15 @@ thisLockWasTriggered(int varno,
* matchLocks -
* match the list of locks and returns the matching rules
*/
-List *
+List *
matchLocks(CmdType event,
RuleLock * rulelocks,
int varno,
Query * parsetree)
{
- List *real_locks = NIL;
- int nlocks;
- int i;
+ List *real_locks = NIL;
+ int nlocks;
+ int i;
Assert(rulelocks != NULL); /* we get called iff there is some lock */
Assert(parsetree != NULL);
@@ -122,7 +122,7 @@ matchLocks(CmdType event,
for (i = 0; i < nlocks; i++)
{
- RewriteRule *oneLock = rulelocks->rules[i];
+ RewriteRule *oneLock = rulelocks->rules[i];
if (oneLock->event == event)
{