Skip to content

Commit 9369000

Browse files
committed
Update rule dumper for the brave new world of ONLY.
1 parent 6bdbd41 commit 9369000

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/backend/utils/adt/ruleutils.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* out of its tuple
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.51 2000/06/09 01:11:09 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.52 2000/06/10 05:17:23 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -114,7 +114,7 @@ static bool check_if_rte_used(Node *node, Index rt_index, int levelsup);
114114
static bool check_if_rte_used_walker(Node *node,
115115
check_if_rte_used_context *context);
116116

117-
#define inherit_marker(rte) ((rte)->inh ? "*" : "")
117+
#define only_marker(rte) ((rte)->inh ? "" : "ONLY ")
118118

119119

120120
/* ----------
@@ -994,8 +994,8 @@ get_select_query_def(Query *query, deparse_context *context)
994994
appendStringInfo(buf, sep);
995995
sep = ", ";
996996
appendStringInfo(buf, "%s%s",
997-
quote_identifier(rte->relname),
998-
inherit_marker(rte));
997+
only_marker(rte),
998+
quote_identifier(rte->relname));
999999

10001000
/*
10011001
* NOTE: SQL92 says you can't write column aliases unless
@@ -1171,8 +1171,8 @@ get_update_query_def(Query *query, deparse_context *context)
11711171
*/
11721172
rte = rt_fetch(query->resultRelation, query->rtable);
11731173
appendStringInfo(buf, "UPDATE %s%s SET ",
1174-
quote_identifier(rte->relname),
1175-
inherit_marker(rte));
1174+
only_marker(rte),
1175+
quote_identifier(rte->relname));
11761176

11771177
/* Add the comma separated list of 'attname = value' */
11781178
sep = "";
@@ -1212,8 +1212,8 @@ get_delete_query_def(Query *query, deparse_context *context)
12121212
*/
12131213
rte = rt_fetch(query->resultRelation, query->rtable);
12141214
appendStringInfo(buf, "DELETE FROM %s%s",
1215-
quote_identifier(rte->relname),
1216-
inherit_marker(rte));
1215+
only_marker(rte),
1216+
quote_identifier(rte->relname));
12171217

12181218
/* Add a WHERE clause if given */
12191219
if (query->qual != NULL)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy