Re: Tab completion for view triggers in psql

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Tab completion for view triggers in psql
Дата
Msg-id 20101126215209.GA30670@fetter.org
обсуждение исходный текст
Ответ на Re: Tab completion for view triggers in psql  (Josh Kupershmidt <schmiddy@gmail.com>)
Список pgsql-hackers
On Wed, Nov 24, 2010 at 11:01:28PM -0500, Josh Kupershmidt wrote:
> On Tue, Nov 23, 2010 at 10:21 PM, 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 looked a little more at this patch today. I didn't find any serious
> problems, though it would have helped me (and maybe other reviewers)
> to have a comprehensive list of the SQL statements which the patch
> implements autocompletion for.

OK, will add those to the description.

> Not sure how hard this would be to add in, but the following gets
> autocompleted with an INSERT:
>   CREATE TRIGGER mytrg BEFORE IN[TAB]
> while the following doesn't find any autocompletions:
>   CREATE TRIGGER mytrg BEFORE INSERT OR UP[TAB]

I might be able to hack something like this together :)

> Also, this existed before the patch, but this SQL:
>   CREATE TRIGGER mytrg INSTEAD OF INSERT ON [TAB]
> autocompletes to:
>   CREATE TRIGGER mytrg INSTEAD OF INSERT ON SET
> 
> not sure how that "SET" is getting in there -- some incorrect tab
> completion match?

Very likely.  At some point, we will have to redo this stuff entirely
with a not-yet-invented parser API which will require a live
connection to the database in order to work correctly.

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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ToDo: enhanced diagnostic for plpgsql
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Assertion failure on hot standby