News for hackers. Stuff that matters.
Re:PostgresJs: The Fastest full featured PostgreSQL client f... by sheaton on Saturday October 14, 2023 @07:09AM (#37879610)
Re:PostgresJs: The Fastest full featured PostgreSQL client f... by indeyets on Saturday October 14, 2023 @08:03AM (#37879838)
+1. I’m a happy user of slonik for several years. Zod integration is very useful
Re:PostgresJs: The Fastest full featured PostgreSQL client f... by hn_throwaway_99 on Saturday October 14, 2023 @09:13AM (#37880221)
Totally agree. Slonik has had typed queries for some time now, but the integration with zod means that those types are verified at runtime. Incredibly useful with Typescript.
Re:PostgresJs: The Fastest full featured PostgreSQL client f... by gajus on Saturday October 14, 2023 @08:38PM (#37885671)
Slonik author here. Happy to answer any questions.
Re:PostgresJs: The Fastest full featured PostgreSQL client f... by jokesterfr on Monday October 16, 2023 @12:30PM (#37902274)
Hi gajus! slonik is a very handy tool, and I used it in production for a quiet some years with success.

Is there any plan to move to PostgresJs instead of pg? If not, would you mind explaining why sticking with pg?

Re:PostgresJs: The Fastest full featured PostgreSQL client f... by gajus on Monday October 23, 2023 @01:18PM (#37988690)
You can already use postgres with Slonik.

https://github.com/gajus/slonik#user-content-slonik-how-are-...

It is not going to be the default because it is way slower.

https://github.com/gajus/slonik/actions/runs/6616647651

Test node_version:18 test_only:postgres-integration is taking 3 minutes.

Test node_version:18 test_only:pg-integration is taking 38 seconds.

It is possible that this is an issue with https://github.com/gajus/postgres-bridge, but I was not able to pinpoint anything in particular that would explain the time difference.