Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
60500d58
Commit
60500d58
authored
Jan 03, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix breakage of rules using NOTIFY actions, per bug report and patch
from sergiop@sinectis.com.ar.
parent
676cf18c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteHandler.c
+2
-1
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+26
-1
No files found.
src/backend/rewrite/rewriteHandler.c
View file @
60500d58
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.8
6 2000/12/07 01:22:2
5 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.8
7 2001/01/03 22:01:0
5 tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -124,6 +124,7 @@ gatherRewriteMeta(Query *parsetree,
* Note that if the rule refers to OLD, its jointree will add back
* a reference to rt_index.
*/
if
(
sub_action
->
jointree
!=
NULL
)
{
bool
found
;
List
*
newjointree
=
adjustJoinTreeList
(
parsetree
,
...
...
src/backend/utils/adt/ruleutils.c
View file @
60500d58
...
...
@@ -3,7 +3,7 @@
* back to source text
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.7
0 2000/11/18 04:40:18
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.7
1 2001/01/03 22:01:05
tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -97,6 +97,7 @@ static void get_select_query_def(Query *query, deparse_context *context);
static
void
get_insert_query_def
(
Query
*
query
,
deparse_context
*
context
);
static
void
get_update_query_def
(
Query
*
query
,
deparse_context
*
context
);
static
void
get_delete_query_def
(
Query
*
query
,
deparse_context
*
context
);
static
void
get_utility_query_def
(
Query
*
query
,
deparse_context
*
context
);
static
void
get_basic_select_query
(
Query
*
query
,
deparse_context
*
context
);
static
void
get_setop_query
(
Node
*
setOp
,
Query
*
query
,
deparse_context
*
context
,
bool
toplevel
);
...
...
@@ -874,6 +875,10 @@ get_query_def(Query *query, StringInfo buf, List *parentrtables)
appendStringInfo
(
buf
,
"NOTHING"
);
break
;
case
CMD_UTILITY
:
get_utility_query_def
(
query
,
&
context
);
break
;
default:
elog
(
ERROR
,
"get_ruledef of %s: query command type %d not implemented yet"
,
rulename
,
query
->
commandType
);
...
...
@@ -1310,6 +1315,26 @@ get_delete_query_def(Query *query, deparse_context *context)
}
}
/* ----------
* get_utility_query_def - Parse back a UTILITY parsetree
* ----------
*/
static
void
get_utility_query_def
(
Query
*
query
,
deparse_context
*
context
)
{
StringInfo
buf
=
context
->
buf
;
if
(
query
->
utilityStmt
&&
IsA
(
query
->
utilityStmt
,
NotifyStmt
))
{
NotifyStmt
*
stmt
=
(
NotifyStmt
*
)
query
->
utilityStmt
;
appendStringInfo
(
buf
,
"NOTIFY %s"
,
quote_identifier
(
stmt
->
relname
));
}
else
elog
(
ERROR
,
"get_utility_query_def: unexpected statement type"
);
}
/*
* Find the RTE referenced by a (possibly nonlocal) Var.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment