Skip to content

Commit 79f1a58

Browse files
committed
Improved example [skip ci]
1 parent 7412842 commit 79f1a58

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/loading/example.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323

2424
// enable extension
2525
pqxx::connection conn("dbname=pgvector_example");
26-
pqxx::work tx(conn);
26+
pqxx::nontransaction tx(conn);
2727
tx.exec("CREATE EXTENSION IF NOT EXISTS vector");
2828

2929
// create table
@@ -56,7 +56,6 @@ int main() {
5656

5757
// update planner statistics for good measure
5858
tx.exec("ANALYZE items");
59-
tx.commit();
6059

6160
return 0;
6261
}

0 commit comments

Comments
 (0)