Re: uncommited question
От
scott.marlowe
Тема
Re: uncommited question
Дата
Msg-id
Pine.LNX.4.33.0208091100500.26264-100000@css120.ihs.com
Ответ на
uncommited question (Rob Brown-Bayliss)
Список
Дерево обсуждения
uncommited question Rob Brown-Bayliss <rob@zoism.org>
Re: uncommited question Andrew Sullivan <andrew@libertyrms.info>
Re: uncommited question "scott.marlowe" <scott.marlowe@ihs.com>
Re: uncommited question Rob Brown-Bayliss <rob@zoism.org>
Re: uncommited question Rob Brown-Bayliss <rob@zoism.org>
Re: uncommited question "scott.marlowe" <scott.marlowe@ihs.com>
Re: uncommited question "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: uncommited question "Nigel J. Andrews" <nandrews@investsystems.co.uk>
On 9 Aug 2002, Rob Brown-Bayliss wrote: > > Hi. > > What happens if I don't do any commits on a connection? > > I am opening a connection and doing a few "selects" from the connection. > > I am not comiting after each query, but instead useing teh same cursor > for another query. > > What then happens if I update records and the commitn from another > connection? What about if I do some udates and inserts from this > connection and commit them? It looks like you've got an Oracle thinking cap on. You'll need to trade that in on a Postgresql thinking cap. In Oracle, when you connect, a transaction is begun for you. Then you do whatever you want, and when you like what you have you commit, or if you don't like it you rollback. Then another transaction begins silently for you. In Postgresql, there are no transactions running automatically for you when you connect. If you issue a SQL command, postgresql will initiate a transaction, perform the SQL, then commit / rollback the transaction automatically, based on whether it went through or not. In Postgresql, if you want a transaction to begin, you have to issue the begin command yourself. Then, all the SQL you type will be in a transaction, and you can either commit or rollback when you are done. Hopefully that explains the difference well enough.
В списке pgsql-general по дате отправления