DROP VIEW code question

Поиск
Список
Период
Сортировка
От Mark Hollomon
Тема DROP VIEW code question
Дата
Msg-id 00101716160001.03433@jupiter
обсуждение исходный текст
Ответы Re: DROP VIEW code question
Re: DROP VIEW code question
Список 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 по дате отправления: