DROP VIEW code question

From: Mark Hollomon <mhh(at)mindspring(dot)com>
To: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: DROP VIEW code question
Date: 2000-10-17 20:16:00
Message-ID: 00101716160001.03433@jupiter
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-17 20:33:07 Re: DROP VIEW code question
Previous Message pgsql-bugs 2000-10-17 19:58:27 UPPER and LOWER dosen't work correctly on special caracters (umlauts)