Re: [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE
Дата
Msg-id 53A0C681.6050106@proxel.se
обсуждение исходный текст
Ответ на [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE  (Ian Barwick <ian@2ndquadrant.com>)
Ответы Re: Re: [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE  (Ian Barwick <ian@2ndquadrant.com>)
Список pgsql-hackers
On 06/17/2014 01:36 PM, Ian Barwick wrote:
> Thanks for this patch; I'm playing around with rules at the moment and
> it was
> very useful. A quick review:
>
> - applies cleanly to HEAD
>
> - does what it claims, i.e. adds tab completion support for this syntax:
>
>      ALTER TABLE table { ENABLE | DISABLE } [ ALWAYS | REPLICA ] { RULE
> | TRIGGER } rule_or_trigger
>      DROP TRIGGER trigger ON relation { CASCADE | RESTRICT }
>      DROP RULE rule ON relation { CASCADE | RESTRICT }
>
> - code style is consistent with the project style

Thanks for the review.

> One issue - the table's internal triggers will also be listed. which can
> result in
> something like this:
>
> This is a bit of an extreme case, but I don't think manually manipulating
> internal triggers (which can only be done as a superuser) is a common
> enough
> operation to justify their inclusion. I suggest adding
> 'AND tgisinternal is FALSE' to 'Query_for_trigger_of_table' to hide them.

Good suggestion. I have attached a patch which filters out the internal
triggers, both for ALTER TABLE and DROP TRIGGER. I am not entirely sure
about the DROP TRIGGER case but I think I prefer no auto completion of
RI triggers.

--
Andreas Karlsson


Вложения

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

Предыдущее
От: "MauMau"
Дата:
Сообщение: Re: [patch] pg_copy - a command for reliable WAL archiving
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_control is missing a field for LOBLKSIZE