Re: Tab completion of SET TRANSACTION ISOLATION

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: Tab completion of SET TRANSACTION ISOLATION
Дата
Msg-id
87vew0p02x.fsf@stark.xeocode.com
Ответ на
Список
Дерево обсуждения
Tab completion of SET TRANSACTION ISOLATION Peter Eisentraut <peter_e@gmx.net>
Re: Tab completion of SET TRANSACTION ISOLATION Tom Lane <tgl@sss.pgh.pa.us>
Re: Tab completion of SET TRANSACTION ISOLATION Tom Lane <tgl@sss.pgh.pa.us>
Re: Tab completion of SET TRANSACTION ISOLATION Csaba Nagy <nagy@ecircle-ag.com>
Re: Tab completion of SET TRANSACTION ISOLATION "Jim C. Nasby" <jnasby@pervasive.com>
Re: Tab completion of SET TRANSACTION ISOLATION Greg Stark <gsstark@mit.edu>
Re: Tab completion of SET TRANSACTION ISOLATION Bruce Momjian <pgman@candle.pha.pa.us>
Re: Tab completion of SET TRANSACTION ISOLATION Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Tab completion of SET TRANSACTION ISOLATION Bruce Momjian <pgman@candle.pha.pa.us>
Re: Tab completion of SET TRANSACTION ISOLATION Rod Taylor <pg@rbt.ca>
Re: Tab completion of SET TRANSACTION ISOLATION Neil Conway <neilc@samurai.com>
Re: Tab completion of SET TRANSACTION ISOLATION Bruce Momjian <pgman@candle.pha.pa.us>
Re: Tab completion of SET TRANSACTION ISOLATION Rod Taylor <pg@rbt.ca>
Re: Tab completion of SET TRANSACTION ISOLATION Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Tab completion of SET TRANSACTION ISOLATION Rod Taylor <pg@rbt.ca>
Re: Tab completion of SET TRANSACTION ISOLATION Tom Lane <tgl@sss.pgh.pa.us>
Tom Lane  writes:

> Hm, that's a bit nasty.
> 
> The only plan I can think of involves reading the list of available
> variable names in advance and keeping it around.  However, I'm not
> sure I want psql issuing such a query at connection startup whether
> or not the info will ever be used :-(

Well, it could just lazily cache the data if it's ever fetched. That would at
least limit the occurrence of this problem to only happening once per
connection.

psql could also hard code "SET TRANSACTION ISOLATION" specifically. If psql
knew that "SET TRANS" completes to SET TRANSACTION and "SET TRANSACTION I"
completes to "SET TRANSACTION ISOLATION" it could avoid doing the query at
all. 

That would only fail if someone uses TAB to view the available completions for
"SET" or any shorter string. And since transaction isolation is strangely
absent from the list of completions that seems like not such a big concern. If
he's doing that he's not going to find it anyways.

-- 
greg


В списке pgsql-hackers по дате отправления
От: Josh Berkus
Дата:
От: Jim C. Nasby
Дата:
FAQ