|
3 | 3 | * out of its tuple
|
4 | 4 | *
|
5 | 5 | * 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 $ |
7 | 7 | *
|
8 | 8 | * This software is copyrighted by Jan Wieck - Hamburg.
|
9 | 9 | *
|
@@ -114,7 +114,7 @@ static bool check_if_rte_used(Node *node, Index rt_index, int levelsup);
|
114 | 114 | staticboolcheck_if_rte_used_walker(Node*node,
|
115 | 115 | check_if_rte_used_context*context);
|
116 | 116 |
|
117 |
| -#defineinherit_marker(rte) ((rte)->inh ? "*" : "") |
| 117 | +#defineonly_marker(rte) ((rte)->inh ? "" : "ONLY") |
118 | 118 |
|
119 | 119 |
|
120 | 120 | /* ----------
|
@@ -994,8 +994,8 @@ get_select_query_def(Query *query, deparse_context *context)
|
994 | 994 | appendStringInfo(buf,sep);
|
995 | 995 | sep=", ";
|
996 | 996 | appendStringInfo(buf,"%s%s",
|
997 |
| -quote_identifier(rte->relname), |
998 |
| -inherit_marker(rte)); |
| 997 | +only_marker(rte), |
| 998 | +quote_identifier(rte->relname)); |
999 | 999 |
|
1000 | 1000 | /*
|
1001 | 1001 | * NOTE: SQL92 says you can't write column aliases unless
|
@@ -1171,8 +1171,8 @@ get_update_query_def(Query *query, deparse_context *context)
|
1171 | 1171 | */
|
1172 | 1172 | rte=rt_fetch(query->resultRelation,query->rtable);
|
1173 | 1173 | appendStringInfo(buf,"UPDATE %s%s SET ",
|
1174 |
| -quote_identifier(rte->relname), |
1175 |
| -inherit_marker(rte)); |
| 1174 | +only_marker(rte), |
| 1175 | +quote_identifier(rte->relname)); |
1176 | 1176 |
|
1177 | 1177 | /* Add the comma separated list of 'attname = value' */
|
1178 | 1178 | sep="";
|
@@ -1212,8 +1212,8 @@ get_delete_query_def(Query *query, deparse_context *context)
|
1212 | 1212 | */
|
1213 | 1213 | rte=rt_fetch(query->resultRelation,query->rtable);
|
1214 | 1214 | appendStringInfo(buf,"DELETE FROM %s%s",
|
1215 |
| -quote_identifier(rte->relname), |
1216 |
| -inherit_marker(rte)); |
| 1215 | +only_marker(rte), |
| 1216 | +quote_identifier(rte->relname)); |
1217 | 1217 |
|
1218 | 1218 | /* Add a WHERE clause if given */
|
1219 | 1219 | if (query->qual!=NULL)
|
|