Commit , Rollback 
Author Message
 Commit , Rollback

Hi List ,
Could any one of you help me in finding  out a way by which
1)when i login to postgres "begin transaction " command  automatically
executes .
2)i write commit it should  commit as well as begin the new  transaction .
3) similarly with rollback.

from
yogesh

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sat, 24 Jul 2004 19:20:30 GMT
 Commit , Rollback

no i want this while quering on the  prompt of psql ... actually i want a
precautionary measure while doing updates , inserts or delete  to a table ..
i want this so that i can roll back the whole transaction  if i make some
mistake ..
thanks for reply.
yogesh

Quote:

> > Hi List ,
> > Could any one of you help me in finding  out a way by which
> > 1)when i login to postgres "begin transaction " command  automatically
> > executes .
> > 2)i write commit it should  commit as well as begin the new  transaction .
> > 3) similarly with rollback.

> Do it at the application level.  

> -Doug
> --
> Let us cross over the river, and rest under the shade of the trees.
>    --T. J. Jackson, 1863

--
Walking on water and developing software from a specification are easy if
both are frozen."
-- Edward V. Berard, "Life-Cycle Approaches"

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sun, 25 Jul 2004 20:40:38 GMT
 Commit , Rollback
On Wed, 6 Feb 2002 12:40:38 +0000 (UTC)

Quote:


> > > Hi List ,
> > > Could any one of you help me in finding  out a way by which
> > > 1)when i login to postgres "begin transaction " command  automatically
> > > executes .
> > > 2)i write commit it should  commit as well as begin the new  transaction .
> > > 3) similarly with rollback.

This is a feature I miss too, that for an entire psql-session be able to
_always_  be in a transaction. Just like sql*plus (I know this is not Oracle, but it is a nice feature)

/Bj?rn
bjorn.lundin at swipnet.se



Sun, 25 Jul 2004 21:06:57 GMT
 Commit , Rollback

Quote:

> no i want this while quering on the  prompt of psql ... actually i want a
> precautionary measure while doing updates , inserts or delete  to a table ..
> i want this so that i can roll back the whole transaction  if i make some
> mistake ..

Well, it can't be done without changing the code.  So change the code,
or live with it and remember to type BEGIN before you start working.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Mon, 26 Jul 2004 00:20:42 GMT
 Commit , Rollback

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quote:
>no i want this while quering on the  prompt of psql ... actually i want a
>precautionary measure while doing updates , inserts or delete  to a table
>..
>i want this so that i can roll back the whole transaction  if i make some
>mistake ..
>thanks for reply.
>yogesh

I wrote a patch that does just this via a -b and \b option: anyone
is welcome to play with it:

http://www.gtsm.com/postgres.html

It is based on the latest cvs version of postgresql, so take care
if applying to an older version. If you have problems and need
a patch for an earlier version, let me know.


PGP Key: 0x14964AC8 200202061602

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBPGGbY7ybkGcUlkrIEQK/EwCgx0gzPhAzaYH9EDXjvMzbkdSDGHQAn2sl
cUkRmHT9plAIuuk1blD7wU2z
=jU3I
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly



Mon, 26 Jul 2004 05:10:24 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. commit, rollback

2. COMMIT / ROLLBACK CLOSE MY RESULTSET IN RDO 2.0

3. Commit/Rollback Error

4. BeginTrans Commit RollBack

5. Commit/Rollback using SQL*Loader

6. Commit/Rollback

7. DTS COMMIT/ROLLBACK

8. BeginTrans|Commit|Rollback

9. Begin/Commit/Rollback in Nested Stored Procedures

10. Commit/Rollback

11. Commit/Rollback in UDF

12. Commit/rollback inside store procs


 
Powered by phpBB® Forum Software