Re: missing rename support

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: missing rename support
Дата
Msg-id CAEZATCXEi7gF4_qyuzuBYBr7kUD7S-nxH0GG=O7HsJG5gs8YuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: missing rename support  (Ali Dar <ali.munir.dar@gmail.com>)
Ответы Re: missing rename support  (Ali Dar <ali.munir.dar@gmail.com>)
Список pgsql-hackers
On 3 January 2013 13:49, Ali Dar <ali.munir.dar@gmail.com> wrote:
> Find attached an initial patch for ALTER RENAME RULE feature. Please note
> that it does not have any documentation yet.
>

Hi,

I just got round to looking at this. All-in-all it looks OK. I just
have a few more review comments, in addition to Stephen's comment
about renaming SELECT rules...

This compiler warning should be fixed with another #include:
alter.c:107:4: warning: implicit declaration of function ‘RenameRewriteRule’

In gram.y, I think you can just use qualified_name instead of
makeRangeVarFromAnyName().

In RenameRewriteRule(), I think it's worth doing a check to ensure
that the relation actually is a table or a view (you might have some
other relation kind at that point in the code). If the user
accidentally types the name of an index, say, instead of a table, then
it is better to throw an error saying "xxx is not a table or a view"
rather than reporting that the rule doesn't exist.

I think this could probably use some simple regression tests to test
both the success and failure cases.

It would be nice to extend psql tab completion to support this too,
although perhaps that could be done as a separate patch.

Don't forget the docs!

Regards,
Dean



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Further pg_upgrade analysis for many tables
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: proposal: fix corner use case of variadic fuctions usage