Re: tab completion for prepared transactions? - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: tab completion for prepared transactions?
Date
Msg-id 1264355305.10311.184.camel@ebony
Whole thread Raw
In response to Re: tab completion for prepared transactions?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: tab completion for prepared transactions?
List pgsql-hackers
On Sun, 2010-01-24 at 19:29 +0200, Heikki Linnakangas wrote:
> Peter Eisentraut wrote:
> > On lör, 2010-01-23 at 12:42 -0500, Tom Lane wrote:
> >> Peter Eisentraut <peter_e@gmx.net> writes:
> >>> Was there a designed-in reason not to have psql tab completion for
> >>> COMMIT/ROLLBACK PREPARED ...?  It does complete the "PREPARED" but not
> >>> the transaction identifiers.  Maybe it's not a common use case, but
> >>> these transaction identifiers sure can be nontrivial to type.
> >> Hmm, what's the use scenario?  I would think that painfully long
> >> gxids would come from some XA manager software, which would be
> >> responsible for committing or canceling them.  Manual override
> >> of that would usually be a bad idea.
> 
> Right, I vaguely recall that the idea of tab-completion for those
> commands was rejected when 2PC was added because of that. A user sitting
> at a psql terminal is not supposed to prepare a transaction. That's
> application server's business.

Maybe so, but that doesn't actually stop people doing it.

I would like a mechanism in the server to prevent a session from
accepting anything other than COMMIT or ROLLBACK PREPARED after a
PREPARE. Otherwise it's possible to screw up your prepared xact and
leave it hanging there.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Resetting a single statistics counter
Next
From: Tom Lane
Date:
Subject: Re: tab completion for prepared transactions?