On Wed, 19 Jun 2024, Adrian Klaver wrote:
It shouldn't:
cat transaction_test.sql
BEGIN;
insert into transaction_test values(1, 'test'), (2, 'dog'), (3, 'cat');
test=# create table transaction_test(id integer, fld_1 varchar);
test=# \i transaction_test.sql
BEGIN
INSERT 0 3
test=*# commit ;
COMMIT
test=# select * from transaction_test ;
id | fld_1
----+-------
1 | test
2 | dog
3 | cat
(3 rows)
Yes, I see how this works if the transaction is committed. But before I
commit the transaction I run a select statement to ensure the rows added are
correct. Can I rollback a commited transaction? I've assumed not, so I won't
commit the transaction without testing. And I'm not getting a detailed error
message.
Rich