Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres.js variant #99

Open
uncomplexity opened this issue Sep 8, 2024 · 5 comments
Open

Postgres.js variant #99

uncomplexity opened this issue Sep 8, 2024 · 5 comments

Comments

@jawj
Copy link
Collaborator

jawj commented Sep 8, 2024

Thanks for the suggestion. Is there a particular platform that has WebSockets but no TCP you want to use this on?

@nicksrandall
Copy link
Contributor

IMHO, Postgres.js is faster and lighter than pg and it's API is more similar to the http api so this could be a way to "unify" the api's in this library.

@uncomplexity
Copy link
Author

Thanks for the suggestion. Is there a particular platform that has WebSockets but no TCP you want to use this on?

well i thought of using vercel for a project, then i dug deeper i realized they're using this as a dependency, which uses pg.

seconding what @nicksrandall said, i think other users will also benefit from the perf gains.

@nicksrandall
Copy link
Contributor

I started to play around with implementing a Postgres.js version of this library... right now it only supports the sql-over-http protocol (which is the use-case I have) but we could add support for sql-over-websockets in the future.

https://github.com/nicksrandall/neon-sql

Warning: This is still very experimental and I may never finish it but it's a start!

@nicksrandall
Copy link
Contributor

I sent a PR to postgres.js that implements neon's flavor of sql-over-ws: porsager/postgres#955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants