Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> 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 an

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > On Wed, 2006-02-01 at 10:28 +0800, Christopher Kings-Lynne wrote: >> What if that role has a maximum of one connection, etc.? > Considering it would only be used when the alternative was to say > "Sorry, tab completion unavailable", I really don't see these

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Rod Taylor
On Wed, 2006-02-01 at 10:28 +0800, Christopher Kings-Lynne wrote: > > I believe psql keeps the password in memory. > > > > \c seems to be able to change databases without asking for the password > > again. > > What if that role has a maximum of one connection, etc.? Considering it would only be

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Christopher Kings-Lynne
I believe psql keeps the password in memory. \c seems to be able to change databases without asking for the password again. What if that role has a maximum of one connection, etc.? Chris ---(end of broadcast)--- TIP 5: don't forget to increase

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Rod Taylor
On Tue, 2006-01-31 at 20:53 -0500, Bruce Momjian wrote: > Rod Taylor wrote: > > On Tue, 2006-01-31 at 20:18 -0500, Bruce Momjian wrote: > > > Christopher Kings-Lynne wrote: > > > > It could read all the SET variables in at startup? > > > > > > Right, but do we want to do that even if they never as

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Neil Conway
On Tue, 2006-01-31 at 20:32 -0500, Rod Taylor wrote: > Perhaps a second database connection could be established during > situations when running tab completion and other psql commands is > impossible on the main one? That would lead to inconsistencies, because of differences between the two sessi

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Bruce Momjian
Rod Taylor wrote: > On Tue, 2006-01-31 at 20:18 -0500, Bruce Momjian wrote: > > Christopher Kings-Lynne wrote: > > > It could read all the SET variables in at startup? > > > > Right, but do we want to do that even if they never ask for a tab > > completion? I think the easiest might be to just sa

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Rod Taylor
On Tue, 2006-01-31 at 20:18 -0500, Bruce Momjian wrote: > Christopher Kings-Lynne wrote: > > It could read all the SET variables in at startup? > > Right, but do we want to do that even if they never ask for a tab > completion? I think the easiest might be to just save the list on first > tab cal

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Bruce Momjian
Christopher Kings-Lynne wrote: > It could read all the SET variables in at startup? Right, but do we want to do that even if they never ask for a tab completion? I think the easiest might be to just save the list on first tab call.

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Christopher Kings-Lynne
It could read all the SET variables in at startup? Peter Eisentraut wrote: 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

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Bruce Momjian
Added to TODO: o Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set. Currently, SET causes a database lookup to check all supported session variables. This

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Michael Paesold
Csaba Nagy wrote: Is there any chance for psql opening a new session if it's inside a transaction and use that to do whatever querying is needed ? Just something like the control connection on ftp (analogy not very good). That could cause other surprises though (could fail for example due to too

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> 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

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Alvaro Herrera
Michael Paesold wrote: > Perhaps not multiple connections, but multiple transactions per connection, > like Oracle supports, AFAIK. All with a big ;-) of course. I doubt it would > be easy to implement that. The assumption > one-connection-has-one-transaction is probably pretty deeply burried i

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Jim C. Nasby
On Tue, Jan 31, 2006 at 03:41:06PM +0100, Csaba Nagy wrote: > Is there any chance for psql opening a new session if it's inside a > transaction and use that to do whatever querying is needed ? Just > something like the control connection on ftp (analogy not very good). > That could cause other surp

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Csaba Nagy
Is there any chance for psql opening a new session if it's inside a transaction and use that to do whatever querying is needed ? Just something like the control connection on ftp (analogy not very good). That could cause other surprises though (could fail for example due to too many connections ope

Re: [HACKERS] Tab completion of SET TRANSACTION ISOLATION

2006-01-31 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> 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 an