1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Remove dashes in comments that don't need them, rewrap with pgindent.

This commit is contained in:
Bruce Momjian
2001-03-22 06:16:21 +00:00
parent 9e1552607a
commit 0686d49da0
100 changed files with 4522 additions and 6023 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.59 2001/03/22 03:59:43 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.60 2001/03/22 06:16:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -61,9 +61,8 @@ InsertRule(char *rulname,
elog(ERROR, "Attempt to insert rule \"%s\" failed: already exists",
rulname);
/* ----------------
* Set up *nulls and *values arrays
* ----------------
/*
* Set up *nulls and *values arrays
*/
MemSet(nulls, ' ', sizeof(nulls));
@ -77,9 +76,8 @@ InsertRule(char *rulname,
values[i++] = DirectFunctionCall1(textin, CStringGetDatum(evqual));
values[i++] = DirectFunctionCall1(textin, CStringGetDatum(actiontree));
/* ----------------
* create a new pg_rewrite tuple
* ----------------
/*
* create a new pg_rewrite tuple
*/
pg_rewrite_desc = heap_openr(RewriteRelationName, RowExclusiveLock);
@ -183,14 +181,13 @@ DefineQueryRewrite(RuleStmt *stmt)
event_relation = heap_openr(event_obj->relname, AccessExclusiveLock);
ev_relid = RelationGetRelid(event_relation);
/* ----------
/*
* The current rewrite handler is known to work on relation level
* rules only. And for SELECT events, it expects one non-nothing
* action that is instead and returns exactly a tuple of the
* rewritten relation. This restricts SELECT rules to views.
* action that is instead and returns exactly a tuple of the rewritten
* relation. This restricts SELECT rules to views.
*
* Jan
* ----------
* Jan
*/
if (event_obj->attrs)
elog(ERROR, "attribute level rules currently not supported");

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.90 2001/03/22 03:59:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.91 2001/03/22 06:16:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -672,17 +672,15 @@ fireRules(Query *parsetree,
{
Query *qual_product;
/* ----------
* If there are instead rules with qualifications,
* the original query is still performed. But all
* the negated rule qualifications of the instead
* rules are added so it does its actions only
* in cases where the rule quals of all instead
* rules are false. Think of it as the default
* action in a case. We save this in *qual_products
* so deepRewriteQuery() can add it to the query
* list after we mangled it up enough.
* ----------
/*
* If there are instead rules with qualifications, the
* original query is still performed. But all the negated rule
* qualifications of the instead rules are added so it does
* its actions only in cases where the rule quals of all
* instead rules are false. Think of it as the default action
* in a case. We save this in *qual_products so
* deepRewriteQuery() can add it to the query list after we
* mangled it up enough.
*/
if (*qual_products == NIL)
qual_product = parsetree;
@ -722,10 +720,9 @@ fireRules(Query *parsetree,
pfree(info);
}
/* ----------
* If this was an unqualified instead rule,
* throw away an eventually saved 'default' parsetree
* ----------
/*
* If this was an unqualified instead rule, throw away an
* eventually saved 'default' parsetree
*/
if (event_qual == NULL && *instead_flag)
*qual_products = NIL;
@ -842,23 +839,20 @@ deepRewriteQuery(Query *parsetree)
rewritten = nconc(rewritten, newstuff);
}
/* ----------
* qual_products are the original query with the negated
* rule qualification of an instead rule
* ----------
/*
* qual_products are the original query with the negated rule
* qualification of an instead rule
*/
if (qual_products != NIL)
rewritten = nconc(rewritten, qual_products);
/* ----------
* The original query is appended last (if no "instead" rule)
* because update and delete rule actions might not do
* anything if they are invoked after the update or
* delete is performed. The command counter increment
* between the query execution makes the deleted (and
* maybe the updated) tuples disappear so the scans
* for them in the rule actions cannot find them.
* ----------
/*
* The original query is appended last (if no "instead" rule) because
* update and delete rule actions might not do anything if they are
* invoked after the update or delete is performed. The command
* counter increment between the query execution makes the deleted
* (and maybe the updated) tuples disappear so the scans for them in
* the rule actions cannot find them.
*/
if (!instead)
rewritten = lappend(rewritten, parsetree);