Skip to content

Commit f6c17bf

Browse files
committed
Updated example [skip ci]
1 parent 0d18d3a commit f6c17bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/pg.zig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const pg = @import("pg");
22
const std = @import("std");
3-
const print = std.debug.print;
43

54
pub fn main() !void {
65
var gpa = std.heap.GeneralPurposeAllocator(.{}).init;
6+
defer std.debug.assert(gpa.deinit() == .ok);
77
const allocator = gpa.allocator();
8+
89
var pool = try pg.Pool.init(allocator, .{ .auth = .{
910
.username = std.mem.sliceTo(std.posix.getenv("USER").?, 0),
1011
.database = "pgvector_zig_test",
@@ -27,6 +28,6 @@ pub fn main() !void {
2728
defer result.deinit();
2829
while (try result.next()) |row| {
2930
const id = row.get(i64, 0);
30-
print("{d}\n", .{id});
31+
std.debug.print("{d}\n", .{id});
3132
}
3233
}

0 commit comments

Comments
 (0)