From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Multiple Xids in PGPROC? |
Date: | 2004-05-05 15:05:28 |
Message-ID: | 87hduux6br.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > Yup.. And some of us intend on wrapping every single statement in a
> > subtransaction so we can rollback on an error without aborting the main
> > transaction.
>
> Point there being "main transaction". What i'm saying is that the vast
> majority of your "transactions" will be single statements. eg. single selects,
> single updates, etc.
And if autocommit mode is off, which is how I would strongly urge people to
work, these single statements will be a subtransaction within a main
transaction.
> > In fact, I would be surprised if tools like psql went very long without
> > doing the same thing so users can recover from spelling mistakes.
>
> If the user does an explicit BEGIN, then perhaps we might, but how often does
> the user do an explicit BEGIN?
Well currently very rare since it's so infuriating to have to start all over
when you make a spelling error. As long as autocommit mode is on the same
thing would happen.
But in Oracle autocommit mode is OFF in the command line tool. You have to
type commit to commit any changes. At first this is surprising and annoying,
but after a while you find it's terribly useful and a much safer way to work.
You can do an update, then double-check that you did the right thing before
committing it.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2004-05-05 15:10:37 | Re: PostgreSQL pre-fork speedup |
Previous Message | Bruce Momjian | 2004-05-05 14:36:36 | ALTER TABLE TODO items |