Re: Tab completion of SET TRANSACTION ISOLATION

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Tab completion of SET TRANSACTION ISOLATION
Дата
Msg-id
3467.1138717770@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
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>
Peter Eisentraut  writes:
> Some time ago, the tab completion code for the SET command was changed
> to read the list of available settings from the pg_settings table.
> This means that by the time you're done completing SET TRANSACTION
> ISOLATION, you've already sent a query and the command will be
> disallowed.  It's not a major issue, but I figured I'd mention it
> since it confused me a while ago.  If someone has an ingenious plan
> for working around this, let me know.

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 :-(

We also have the ability to check the current in-transaction status,
so one possibility is to read the variable list only if not within
a transaction (and we didn't do it already in the current session).
Making the behavior of tab completion be state-dependent may seem
like a non-starter, but really it is anyway --- anything involving
a query will stop working in a failed transaction.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Christopher Browne
Дата:
От: Csaba Nagy
Дата:
FAQ