diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-09-01 04:40:42 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-09-01 04:40:42 +0000 |
commit | fa1a8d6a97068295fe30ac646aec7493a6305bc2 (patch) | |
tree | 645f7cef3c78fbab4d6d7bbc7c9a61ad2893d273 /src/backend/rewrite/rewriteDefine.c | |
parent | af74855a608da4cd7ef88ceb2241ec1c75537f39 (diff) | |
download | postgresql-fa1a8d6a97068295fe30ac646aec7493a6305bc2.tar.gz postgresql-fa1a8d6a97068295fe30ac646aec7493a6305bc2.zip |
OK, folks, here is the pgindent output.
Diffstat (limited to 'src/backend/rewrite/rewriteDefine.c')
-rw-r--r-- | src/backend/rewrite/rewriteDefine.c | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index c055b47dd1a..20eff2fbb03 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.20 1998/09/01 03:24:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.21 1998/09/01 04:31:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -156,6 +156,7 @@ ValidateRule(int event_type, } #if 0 + /* * on retrieve to class.attribute do instead nothing is converted to * 'on retrieve to class.attribute do instead retrieve (attribute = @@ -200,51 +201,55 @@ DefineQueryRewrite(RuleStmt *stmt) * rules only. And for SELECT events, it expects one non-nothing * action that is instead. Since we now hand out views and rules * to regular users, we must deny anything else. - * + * * I know that I must write a new rewrite handler from scratch * for 6.5 so we can remove these checks and allow all the rules. * - * Jan + * Jan * ---------- */ if (event_obj->attrs) elog(ERROR, "attribute level rules currently not supported"); - /* - eslot_string = strVal(lfirst(event_obj->attrs)); - */ + + /* + * eslot_string = strVal(lfirst(event_obj->attrs)); + */ else eslot_string = NULL; if (action != NIL) - foreach (l, action) { - query = (Query *)lfirst(l); - if (query->resultRelation == 1) { - elog(NOTICE, "rule actions on OLD currently not supported"); - elog(ERROR, " use views or triggers instead"); - } - if (query->resultRelation == 2) { - elog(NOTICE, "rule actions on NEW currently not supported"); - elog(ERROR, " use triggers instead"); - } + foreach(l, action) + { + query = (Query *) lfirst(l); + if (query->resultRelation == 1) + { + elog(NOTICE, "rule actions on OLD currently not supported"); + elog(ERROR, " use views or triggers instead"); } + if (query->resultRelation == 2) + { + elog(NOTICE, "rule actions on NEW currently not supported"); + elog(ERROR, " use triggers instead"); + } + } - if (event_type == CMD_SELECT) { - if (length(action) == 0) { + if (event_type == CMD_SELECT) + { + if (length(action) == 0) + { elog(NOTICE, "instead nothing rules on select currently not supported"); elog(ERROR, " use views instead"); } - if (length(action) > 1) { + if (length(action) > 1) elog(ERROR, "multiple action rules on select currently not supported"); - } - query = (Query *)lfirst(action); - if (!is_instead || query->commandType != CMD_SELECT) { + query = (Query *) lfirst(action); + if (!is_instead || query->commandType != CMD_SELECT) elog(ERROR, "only instead-select rules currently supported on select"); - } } + /* - * This rule is currently allowed - too restricted I know - - * but women and children first - * Jan + * This rule is currently allowed - too restricted I know - but women + * and children first Jan */ event_relation = heap_openr(event_obj->relname); |