Re: Tab completion for view triggers in psql

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Tab completion for view triggers in psql
Дата
Msg-id 20101130091829.GD4549@fetter.org
обсуждение исходный текст
Ответ на Re: Tab completion for view triggers in psql  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Ответы Re: Tab completion for view triggers in psql  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
On Tue, Nov 30, 2010 at 05:48:04PM +0900, Itagaki Takahiro wrote:
> On Wed, Nov 24, 2010 at 12:21, David Fetter <david@fetter.org> wrote:
> > Please find attached a patch changing both this and "updateable" to
> > "updatable," also per the very handy git grep I just learned about :)
>
> I think the patch has two issues to be fixed.
>
> It expands all tables (and views) in tab-completion after INSERT,
> UPDATE, and DELETE FROM.  Is it an intended change?  IMHO, I don't
> want to expand any schema because my console is filled with system
> tables and duplicated tables with or without schema names :-( .
>
> (original)
> =# INSERT INTO [tab]
> information_schema.  pg_temp_1.           pg_toast_temp_1.     tbl
> pg_catalog.          pg_toast.            public.
>
> (patched)
> =# INSERT INTO [tab]
> Display all 113 possibilities? (y or n)

Yes.  I believe that the question of having INSERT INTO [tab] check
for permissions is a separate issue from this patch.  This patch does
bring the question of whether it *should* check such permission into
more focus, though.  Whether it should is probably a matter for a
separate thread, though.  I could create arguments in both directions.

> Also, event names are not completed after INSTEAD OF:
>
> =# CREATE TRIGGER trg BEFORE [tab]
> DELETE    INSERT    TRUNCATE  UPDATE
> =# CREATE TRIGGER trg INSTEAD OF [tab]
> (no candidates)

This one's fixed in the attached patch, although subsequent events, as
in

=# CREATE TRIGGER trg BEFORE INSERT OR [tab]

are not.

Thanks for your review :)

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Вложения

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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Tab completion for view triggers in psql
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: pg_execute_from_file review