pgsql: Improve tab-completion of DROP and ALTER ENABLE/DISABLE on trigg

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve tab-completion of DROP and ALTER ENABLE/DISABLE on trigg
Date: 2014-06-23 21:12:21
Message-ID: E1WzBXJ-00082p-Tm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve tab-completion of DROP and ALTER ENABLE/DISABLE on triggers and rules.

At "DROP RULE/TRIGGER triggername ON ...", tab-complete tables that have
a rule/trigger with that name.

At "ALTER TABLE tablename ENABLE/DISABLE TRIGGER/RULE ...", tab-complete to
rules/triggers on that table. Previously, we would tab-complete to all
rules or triggers, not just those that are on that table.

Also, filter out internal RI triggers from the list. You can't DROP them,
and enabling/disabling them is such a rare (and dangerous) operation that
it seems better to hide them.

Andreas Karlsson, reviewed by Ian Barwick.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/631e7f6b4e0629077408d3f8caf282627765f3f0

Modified Files
--------------
src/bin/psql/tab-complete.c | 114 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 113 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-06-23 22:27:27 Re: pgsql: Do all-visible handling in lazy_vacuum_page() outside its critic
Previous Message Jeff Davis 2014-06-23 20:00:11 Re: pgsql: Do all-visible handling in lazy_vacuum_page() outside its critic