Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d33bbb5

Browse files
committed
Get rid of some long-dead code that thinks NOTIFY is passed to the
planner/optimizer/executor. It isn't. Besides, most of the removed code consists of comments about how it's not right.
1 parent 92edd42 commit d33bbb5

File tree

3 files changed

+20
-52
lines changed

3 files changed

+20
-52
lines changed

src/backend/executor/execMain.c

+17-41
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.56 1998/09/25 13:38:30 thomas Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.57 1998/10/01 02:03:58 tgl Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -337,8 +337,6 @@ ExecCheckPerms(CmdType operation,
337337
((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
338338
opstr = "append";
339339
break;
340-
case CMD_NOTIFY: /* what does this mean?? -- jw,
341-
* 1/6/94 */
342340
case CMD_DELETE:
343341
case CMD_UPDATE:
344342
ok = ((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
@@ -351,7 +349,6 @@ ExecCheckPerms(CmdType operation,
351349
}
352350
else
353351
{
354-
/* XXX NOTIFY?? */
355352
ok = ((aclcheck_result = CHECK(ACL_RD)) == ACLCHECK_OK);
356353
opstr = "read";
357354
}
@@ -724,26 +721,23 @@ ExecutePlan(EState *estate,
724721

725722
for (;;)
726723
{
727-
if (operation != CMD_NOTIFY)
728-
{
729-
/******************
730-
* Execute the plan and obtain a tuple
731-
******************
732-
*/
733-
/* at the top level, the parent of a plan (2nd arg) is itself */
734-
slot = ExecProcNode(plan, plan);
724+
/******************
725+
* Execute the plan and obtain a tuple
726+
******************
727+
*/
728+
/* at the top level, the parent of a plan (2nd arg) is itself */
729+
slot = ExecProcNode(plan, plan);
735730

736-
/******************
737-
* if the tuple is null, then we assume
738-
* there is nothing more to process so
739-
* we just return null...
740-
******************
741-
*/
742-
if (TupIsNull(slot))
743-
{
744-
result = NULL;
745-
break;
746-
}
731+
/******************
732+
* if the tuple is null, then we assume
733+
* there is nothing more to process so
734+
* we just return null...
735+
******************
736+
*/
737+
if (TupIsNull(slot))
738+
{
739+
result = NULL;
740+
break;
747741
}
748742

749743
/******************
@@ -832,24 +826,6 @@ ExecutePlan(EState *estate,
832826
result = NULL;
833827
break;
834828

835-
/*
836-
* Total hack. I'm ignoring any accessor functions for
837-
* Relation, RelationForm, NameData. Assuming that
838-
* NameData.data has offset 0.
839-
*/
840-
case CMD_NOTIFY:
841-
{
842-
RelationInfo *rInfo = estate->es_result_relation_info;
843-
Relation rDesc = rInfo->ri_RelationDesc;
844-
845-
Async_Notify(rDesc->rd_rel->relname.data);
846-
result = NULL;
847-
current_tuple_count = 0;
848-
numberTuples = 1;
849-
elog(DEBUG, "ExecNotify %s", &rDesc->rd_rel->relname);
850-
}
851-
break;
852-
853829
default:
854830
elog(DEBUG, "ExecutePlan: unknown operation in queryDesc");
855831
result = NULL;

src/backend/optimizer/plan/planmain.c

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.28 1998/09/01 04:29:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.29 1998/10/01 02:03:59 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -96,14 +96,7 @@ query_planner(Query *root,
9696
*/
9797
if (tlist == NIL && qual == NULL)
9898
{
99-
if (command_type == CMD_DELETE ||
100-
101-
/*
102-
* Total hack here. I don't know how to handle statements like
103-
* notify in action bodies. Notify doesn't return anything but
104-
* scans a system table.
105-
*/
106-
command_type == CMD_NOTIFY)
99+
if (command_type == CMD_DELETE)
107100
{
108101
return ((Plan *) make_seqscan(NIL,
109102
NIL,

src/include/nodes/nodes.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: nodes.h,v 1.30 1998/09/01 04:36:41 momjian Exp $
9+
* $Id: nodes.h,v 1.31 1998/10/01 02:04:01 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -305,7 +305,6 @@ typedef enum CmdType
305305
CMD_UPDATE, /* update stmt (formerly replace) */
306306
CMD_INSERT, /* insert stmt (formerly append) */
307307
CMD_DELETE,
308-
CMD_NOTIFY,
309308
CMD_UTILITY, /* cmds like create, destroy, copy,
310309
* vacuum, etc. */
311310
CMD_NOTHING /* dummy command for instead nothing rules

0 commit comments

Comments
 (0)