Re: missing rename support

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: missing rename support
Дата
Msg-id 16616.1360386583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: missing rename support  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> [ alter-rule-rename_complete.v2.patch ]

Committed with assorted editorialization.  Aside from cosmetic issues,
the main changes were:

* use RangeVarGetRelidExtended with a callback to perform the lookup
and locking of the target relation.  This is a new API that the original
version of RenameRewriteRule couldn't have known about.  I borrowed the
code pretty much verbatim from renametrig(), and am now wondering
whether there shouldn't be some attempt to unify the callbacks for this.

* call CacheInvalidateRelcache to ensure that other sessions notice the
rule tuple update.  It may be that this isn't necessary because nothing
looks at the rule name fields in relcache entries ... but I wouldn't bet
on that, and in any case it seems like bad practice to let stale cache
entries hang around.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Identity projection
Следующее
От: Pavan Deolasee
Дата:
Сообщение: Re: Too frequent checkpoints ?