In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "what are the differences between Oracle and PostgreSQL in transaction processing". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the differences between Oracle and PostgreSQL in transaction processing?"
Oracle
Oracle database, multiple statements in the same transaction, such as a statement execution error, the statement does not affect the execution of other statements, such as transaction commit, the execution of successful statements will be persisted to DB.
Test script:
TEST-orcl@server4 > drop table tbl3;Table dropped.TEST-orcl@server4 > create table tbl3 (var varchar (2), fixed char (2)); Table created.TEST-orcl@server4 > TEST-orcl@server4 > insert into tbl3 values ('1Chou Zuo 1'); 1 row created.TEST-orcl@server4 > insert into tbl3 values (' 2Zhi Zhi Jian 2'); 1 row created.TEST-orcl@server4 > insert into tbl3 values ('test x3Jing' Test x3') Insert into tbl3 values ('test x3') * ERROR at line 1:ORA-12899: value too large for column "TEST". "TBL3". "VAR" (actual: 6, maximum:2) TEST-orcl@server4 > insert into tbl3 values ('4Xu dagger 4'); 1 row created.TEST-orcl@server4 > TEST-orcl@server4 > commit;Commit complete.TEST-orcl@server4 > TEST-orcl@server4 > select * from tbl3;VA FI-- 1 1224 4TEST-orcl@server4 >
PG
PG database, multiple statements in the same transaction, such as an error in the execution of a SQL statement, the transaction will be rolled back even if the commit is executed later. If you execute other DML statements after the error statement, an error will be reported.
Testdb=# drop table if exists tbl3; tbl3;DROP TABLEtestdb=# create table tbl3 (var varchar (2), fixed char (2)); CREATE TABLEtestdb=# testdb=# begin;BEGINtestdb=# testdb=# insert into tbl3 values ('1m); INSERT 0 1testdb=# insert into tbl3 values ('2m); INSERT 0 1testdb=# insert into tbl3 values ('test 3'); ERROR: value too long for type character varying (2) testdb=# insert into tbl3 values ('4m) ERROR: current transaction is aborted, commands ignored until end of transaction blocktestdb=# testdb=# commit;ROLLBACKtestdb=# testdb=# select * from tbl3; var | fixed-+-(0 rows) so far, I believe you have a better understanding of "what are the differences between Oracle and PostgreSQL in transaction processing". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.