DROP VIEW code question - Mailing list pgsql-hackers

From Mark Hollomon
Subject DROP VIEW code question
Date
Msg-id 00101716160001.03433@jupiter
Whole thread Raw
Responses Re: DROP VIEW code question
Re: DROP VIEW code question
List 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


pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Re: ?????: ?????: WAL and indexes (Re: [HACKERS] WA L status & todo)
Next
From: Peter Eisentraut
Date:
Subject: Re: DROP VIEW code question