In tcop/ulitity.c we have the following code fragment:
case VIEW:
{char *viewName = stmt->name;char *ruleName;
ruleName = MakeRetrieveViewRuleName(viewName);relationName = RewriteGetRuleEventRel(ruleName);
This looks like an expensive no-op to me.
if viewname == "myview"
then ruleName == "_RETmyview" (+/- multibyte aware truncation)
then relationName == "myview"
Is this code doing something that I'm missing?
Also
"DROP TABLE x, y, z" is allowed, but
"DROP VIEW x, y, z" is not.
Any reason other than historical?
--
Mark Hollomon