Prototoype for Datasette on PostgreSQL
See original GitHub issueI thought this would never happen, but now that I’m deep in the weeds of running SQLite in production for Datasette Cloud I’m starting to reconsider my policy of only supporting SQLite.
Some of the factors making me think PostgreSQL support could be worth the effort:
- Serverless. I’m getting increasingly excited about writable-database use-cases for Datasette. If it could talk to PostgreSQL then users could easily deploy it on Heroku or other serverless providers that can talk to a managed RDS-style PostgreSQL.
- Existing databases. Plenty of organizations have PostgreSQL databases. They can export to SQLite using db-to-sqlite but that’s a pretty big barrier to getting started - being able to run
datasette postgresql://connection-string
and start trying it out would be a massively better experience. - Data size. I keep running into use-cases where I want to run Datasette against many GBs of data. SQLite can do this but PostgreSQL is much more optimized for large data, especially given the existence of tools like Citus.
- Marketing. Convincing people to trust their data to SQLite is potentially a big barrier to adoption. Even if I’ve convinced myself it’s trustworthy I still have to convince everyone else.
- It might not be that hard? If this required a ground-up rewrite it wouldn’t be worth the effort, but I have a hunch that it may not be too hard - most of the SQL in Datasette should work on both databases since it’s almost all portable SELECT statements. If Datasette did DML this would be a lot harder, but it doesn’t.
- Plugins! This feels like a natural surface for a plugin - at which point people could add MySQL support and suchlike in the future.
The above reasons feel strong enough to justify a prototype.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Rapid Prototyping Tool - PostgreSQL
I'm looking for a tool that can create a rapid prototype (proof of concept) for an application, based on an existing PostgreSQL database....
Read more >Build a Data Access Layer with PostgreSQL and Node.js
Find out how to create a Data Access Layer that communicates to PostgreSQL through Node.js.
Read more >THE DESIGN OF POSTGRES Abstract 1. INTRODUCTION 1
The INGRES relational database management system (DBMS) was implemented during. 1975-1977 at the Univerisity of California. Since 1978 various prototype ...
Read more >Tracking changes in PostgreSQL - CYBERTEC
First of all we need a table to store those changes. For a quick prototype we can use the following table structure.
Read more >Using basic SQL prototyping - IBM
Using basic SQL prototyping ... To display the primary Basic SELECT Prototyping panel, select option 1 (Basic) on the SQL Prototyping, Execution and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Worth mentioning here: I’ve been doing a tun of research around running Datasette-like functionality against PostgreSQL in my https://github.com/simonw/django-sql-dashboard project - which will definitely inform the Datasette implementation.
It looks like the answer to this is yes - I’ll need users to setup read-only credentials. Here’s a TIL about that: https://til.simonwillison.net/postgresql/read-only-postgresql-user