Postgres.new: In-browser Postgres with an AI interface
postgres.new is an in-browser Postgres sandbox that integrates AI assistance for managing databases, supporting features like CSV imports, report generation, and semantic search, with future cost-effective deployments planned.
Read original articlepostgres.new is an innovative in-browser Postgres sandbox that integrates AI assistance, allowing users to create and manage multiple Postgres databases directly in their browser. This tool leverages PGlite, a WebAssembly version of Postgres, enabling functionalities such as drag-and-drop CSV imports, report generation, chart creation, and database diagramming. The AI component, currently utilizing GPT-4o, operates with full autonomy over the database, facilitating seamless execution of SQL commands and error handling. Users can visualize data quickly through integrated charting features and generate entity-relationship diagrams based on AI-generated SQL statements. The platform also supports semantic search capabilities through the pgvector extension, which allows for in-browser vector searches. Future enhancements include read-only deployments on S3, making it cost-effective for developers to utilize Postgres features without the overhead of a full database. PGlite's architecture supports various data persistence backends and is designed for rapid unit testing and local development. Overall, postgres.new aims to streamline database interactions and enhance developer productivity by combining the power of Postgres with AI-driven tools.
- postgres.new offers an in-browser Postgres experience with AI assistance.
- Users can perform tasks like CSV imports, report generation, and chart creation seamlessly.
- The platform utilizes PGlite, enabling fast and efficient database operations.
- Future plans include cost-effective read-only deployments on S3.
- The integration of semantic search capabilities enhances data querying and analysis.
Related
Just Use Postgres for Everything
The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.
Just Use Postgres for Everything
The blog post advocates for using PostgreSQL extensively in tech stacks to simplify development, improve productivity, and reduce complexity. It highlights benefits like scalability, efficiency, and cost-effectiveness, promoting a consolidated approach.
Postgres vs. Pinecone
Postgres and Pinecone differ in performance and cost. Pinecone criticizes Postgres for index issues, while Postgres showcases superior performance with tweaks, specialized indexes, and cost-effectiveness, offering transparency and customization.
Neon: A serverless open-source alternative to AWS Aurora Postgres
Neon is an open-source, serverless alternative to AWS Aurora Postgres, featuring a scalable architecture with a free tier, local installation requirements, and comprehensive documentation for users and contributors.
Show HN: PGlite – in-browser WASM Postgres with pgvector and live sync
PGlite is a lightweight, embeddable Postgres database under 3MB, operating in a WebAssembly environment, supporting dynamic extensions, reactive programming, and AI-driven database creation via Supabase.
- Many users find the AI assistance impressive, successfully generating complex database schemas and handling queries.
- Some users express concerns about the limitations of AI, noting issues with generating valid SQL and the need for manual code review.
- There is a desire for a version of the tool that operates without mandatory AI features, as some users prefer a more traditional database management approach.
- Users appreciate the potential for educational use and collaboration, particularly in teaching SQL and simplifying database interactions for non-technical users.
- Several comments highlight technical questions and suggestions for future features, indicating active interest in the tool's development.
- a customer orders database with products with a timeseries of prices, and multiple fulfilments per order. - an issue tracking system with a reflexive user/manager database - a family relationship model
In each case I got it to put in sample model and then asked postgres.new to answer some questions about the data it had inserted. I thought the family model would trip it up, especially when I told it to put in cousins and uncles. But no, it was pretty bang on.
The only thing it didn't quite manage is that some of the relationships are reciprocal (i.e. my sibling also has me as a sibling).
I asked postgres.new to review the data and it fixed some, and i asked it to check again and it fixed the rest. This is a very useful tool that I can see myself using!
- I got it to generate invalid SQL resulting in errors - it merely generates reasonable SQL, but in my case it generated to disjoint set of tables…. - In practice you have tot review all code - It can point you into the wrong direction. Novel systems often have something smart/abstract in there. This system creates mostly Straightforward simple systems. That’s not where the value is
All in all, it’s not worth it to me. Writing code myself is easier than having to review LLM code
Within our organization we have forbidden full LLM merge request because more often than not the code was suboptimal. And had sneaky bugs/mistakes.
I’m not saying these can’t be overcome. But not with current LLM design. They mostly generate stuff they have seen and are bad as truly new stuff.
Edit: Okay reading kiwicopple's comment makes it clearer that chatGPT is not-optional. I'm... not enthused by this. Why would you take something that's local-first and gatekeep it with something as useless as an AI-for-your-db?
https://pglite.dev/repl/ is available as a more barebones browser-pglite playground.
Really impressive stuff - congratulations!
Also, does the WASM build perhaps enable using Postgres as an embedded db, where typically SQlite would be used?
Overall, looks pretty good. I’m on mobile but stumbled upon the blog post in comments.
Ask: I understand why it won’t run on mobile but at least give mobile a synopsis of what it’s suppose to do. I almost ignored this if it wasn’t for the luck of seeing your comment.
Rudimentary compared to what you've done, but is it possible to take an existing database schema, developed either in the Supabase migrations style or another tool like Flyway, and draw the diagram? That alone is huge for us in an enterprise setting, and would allow us to communicate the structure of the database to business folks (especially large databases). How does the tool build that from migrations currently?
There's nothing wrong using Webkit / Safari on your laptop or desktop. There are dozens of us, DOZENS!
Good work
Under the hood, we store the embeddings in a meta.embeddings table then pass back to AI the resulting IDs for each embedding. We do this because embedding vectors are big, and sending these back and forth to the model is not only expensive, but also error prone. Instead, the language model is aware of the meta.embeddings table and simply subqueries to it when it needs access to an embedding.
A couple Qs if anyone knows:1. What does it mean to "pass back to AI the resulting IDs for each embedding" but not the table rows corresponding to the matched vectors?
2. Does "the language model is aware of the meta.embedding table" mean Supabase has deployed a fine-tuned GPT-4o?
What the team at Supabase have built with postgres.new is incredible, it has been a lot of fun to work with them on it over the last month or so. It's fead directly back into the development of PGlite and helped us iron out some bugs and finish hitting the feature list required.
SQL databases and LLMs go together so incredible well, the structured data and schema enables an LLM to infer so much context about the database and the underlying data. This exploration into a UI over this paring is going to be incredibly influential, it opens up what has traditionally been a complex technical problem to everyone. That's the true power of LLMs.
I'm not going to go on about PGlite here as postgres.new really deserves the limelight!
2 hours ago | 41 comments: https://news.ycombinator.com/item?id=41224689
- duckdb which also supports WASM - UWData's Mosaic (https://github.com/uwdata/mosaic) which supports real-time plots
would be really nice to have a kind of "drop-in" page that we could add to any intranet where people could just retrieve an export of some database, and plot it with your code
infinite error loop
How will it perform if I have 1TB of data?
My biggest prediction is that ORMs will not be necessary when LLMs can generate SQL. Low level SQL is a better abstraction for LLMs than ORMs, and as people are removed from the equation, so too will abstractions built to help them craft code.
NICE!
> with an AI interface
... uhh
Related
Just Use Postgres for Everything
The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.
Just Use Postgres for Everything
The blog post advocates for using PostgreSQL extensively in tech stacks to simplify development, improve productivity, and reduce complexity. It highlights benefits like scalability, efficiency, and cost-effectiveness, promoting a consolidated approach.
Postgres vs. Pinecone
Postgres and Pinecone differ in performance and cost. Pinecone criticizes Postgres for index issues, while Postgres showcases superior performance with tweaks, specialized indexes, and cost-effectiveness, offering transparency and customization.
Neon: A serverless open-source alternative to AWS Aurora Postgres
Neon is an open-source, serverless alternative to AWS Aurora Postgres, featuring a scalable architecture with a free tier, local installation requirements, and comprehensive documentation for users and contributors.
Show HN: PGlite – in-browser WASM Postgres with pgvector and live sync
PGlite is a lightweight, embeddable Postgres database under 3MB, operating in a WebAssembly environment, supporting dynamic extensions, reactive programming, and AI-driven database creation via Supabase.