Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Tab completion of SET TRANSACTION ISOLATION


  • From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
  • To: Peter Eisentraut <peter_e(at)gmx(dot)net>
  • Cc: pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: Tab completion of SET TRANSACTION ISOLATION
  • Date: Tue, 31 Jan 2006 15:41:06 +0100
  • Message-id: <1138718466(dot)24321(dot)89(dot)camel(at)coppola(dot)muc(dot)ecircle(dot)de>

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 open), and I have no idea about psql internals so
it might be completely against it's philosophy...

Cheers,
Csaba.

On Tue, 2006-01-31 at 15:29, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group