PostgreSQL actually treats every SQL statement as being executed within a transaction. If you do not issue a BEGIN command, then each individual statement has an implicit BEGIN and (if successful) COMMIT wrapped around it. A group of statements surrounded by BEGIN and COMMIT is sometimes called a transaction block.
как ты думаешь, если открывать транзакцию, вставлять запись, закрывать транзакцию для каждой записи будет так же быстро,к ак и
открыть транзакцию, вставить кучу записей и закрыть транзакцию?