mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
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.
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.56 1998/09/25 13:38:30 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.57 1998/10/01 02:03:58 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -337,8 +337,6 @@ ExecCheckPerms(CmdType operation,
|
|||||||
((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
|
((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
|
||||||
opstr = "append";
|
opstr = "append";
|
||||||
break;
|
break;
|
||||||
case CMD_NOTIFY: /* what does this mean?? -- jw,
|
|
||||||
* 1/6/94 */
|
|
||||||
case CMD_DELETE:
|
case CMD_DELETE:
|
||||||
case CMD_UPDATE:
|
case CMD_UPDATE:
|
||||||
ok = ((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
|
ok = ((aclcheck_result = CHECK(ACL_WR)) == ACLCHECK_OK);
|
||||||
@ -351,7 +349,6 @@ ExecCheckPerms(CmdType operation,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* XXX NOTIFY?? */
|
|
||||||
ok = ((aclcheck_result = CHECK(ACL_RD)) == ACLCHECK_OK);
|
ok = ((aclcheck_result = CHECK(ACL_RD)) == ACLCHECK_OK);
|
||||||
opstr = "read";
|
opstr = "read";
|
||||||
}
|
}
|
||||||
@ -724,26 +721,23 @@ ExecutePlan(EState *estate,
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (operation != CMD_NOTIFY)
|
/******************
|
||||||
{
|
* Execute the plan and obtain a tuple
|
||||||
/******************
|
******************
|
||||||
* Execute the plan and obtain a tuple
|
*/
|
||||||
******************
|
/* at the top level, the parent of a plan (2nd arg) is itself */
|
||||||
*/
|
slot = ExecProcNode(plan, plan);
|
||||||
/* at the top level, the parent of a plan (2nd arg) is itself */
|
|
||||||
slot = ExecProcNode(plan, plan);
|
|
||||||
|
|
||||||
/******************
|
/******************
|
||||||
* if the tuple is null, then we assume
|
* if the tuple is null, then we assume
|
||||||
* there is nothing more to process so
|
* there is nothing more to process so
|
||||||
* we just return null...
|
* we just return null...
|
||||||
******************
|
******************
|
||||||
*/
|
*/
|
||||||
if (TupIsNull(slot))
|
if (TupIsNull(slot))
|
||||||
{
|
{
|
||||||
result = NULL;
|
result = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************
|
/******************
|
||||||
@ -832,24 +826,6 @@ ExecutePlan(EState *estate,
|
|||||||
result = NULL;
|
result = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
|
||||||
* Total hack. I'm ignoring any accessor functions for
|
|
||||||
* Relation, RelationForm, NameData. Assuming that
|
|
||||||
* NameData.data has offset 0.
|
|
||||||
*/
|
|
||||||
case CMD_NOTIFY:
|
|
||||||
{
|
|
||||||
RelationInfo *rInfo = estate->es_result_relation_info;
|
|
||||||
Relation rDesc = rInfo->ri_RelationDesc;
|
|
||||||
|
|
||||||
Async_Notify(rDesc->rd_rel->relname.data);
|
|
||||||
result = NULL;
|
|
||||||
current_tuple_count = 0;
|
|
||||||
numberTuples = 1;
|
|
||||||
elog(DEBUG, "ExecNotify %s", &rDesc->rd_rel->relname);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
elog(DEBUG, "ExecutePlan: unknown operation in queryDesc");
|
elog(DEBUG, "ExecutePlan: unknown operation in queryDesc");
|
||||||
result = NULL;
|
result = NULL;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.28 1998/09/01 04:29:51 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.29 1998/10/01 02:03:59 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -96,14 +96,7 @@ query_planner(Query *root,
|
|||||||
*/
|
*/
|
||||||
if (tlist == NIL && qual == NULL)
|
if (tlist == NIL && qual == NULL)
|
||||||
{
|
{
|
||||||
if (command_type == CMD_DELETE ||
|
if (command_type == CMD_DELETE)
|
||||||
|
|
||||||
/*
|
|
||||||
* Total hack here. I don't know how to handle statements like
|
|
||||||
* notify in action bodies. Notify doesn't return anything but
|
|
||||||
* scans a system table.
|
|
||||||
*/
|
|
||||||
command_type == CMD_NOTIFY)
|
|
||||||
{
|
{
|
||||||
return ((Plan *) make_seqscan(NIL,
|
return ((Plan *) make_seqscan(NIL,
|
||||||
NIL,
|
NIL,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nodes.h,v 1.30 1998/09/01 04:36:41 momjian Exp $
|
* $Id: nodes.h,v 1.31 1998/10/01 02:04:01 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -305,7 +305,6 @@ typedef enum CmdType
|
|||||||
CMD_UPDATE, /* update stmt (formerly replace) */
|
CMD_UPDATE, /* update stmt (formerly replace) */
|
||||||
CMD_INSERT, /* insert stmt (formerly append) */
|
CMD_INSERT, /* insert stmt (formerly append) */
|
||||||
CMD_DELETE,
|
CMD_DELETE,
|
||||||
CMD_NOTIFY,
|
|
||||||
CMD_UTILITY, /* cmds like create, destroy, copy,
|
CMD_UTILITY, /* cmds like create, destroy, copy,
|
||||||
* vacuum, etc. */
|
* vacuum, etc. */
|
||||||
CMD_NOTHING /* dummy command for instead nothing rules
|
CMD_NOTHING /* dummy command for instead nothing rules
|
||||||
|
Reference in New Issue
Block a user