I've built Selectable - a freemium Postgres client for Android devices. It's currently available for open testing, links below.
The key feature is the SQL query editor. The query editor was designed to be mobile-friendly. With autocomplete and a touch-friendly way to select parts of a SQL query, writing SQL statements with the query editor can - in some cases - be faster than typing the same query on a desktop.
The app supports the usual SQL client things:
- Browsing schemas, tables, and columns
- Running custom SQL statements
- Viewing results as a list, or as a table.
- Exporting results to CSV
- Saving queries (You can save one query in the free version)
The project is in very early stages, and is still missing a lot of features - notably the ability to insert, update, delete, or perform DDL via the query editor.
The app currently only supports Postgres, and is currently only available on Android.
Please give it a spin, and let me know if you have any feedback or feature requests.
I'm not trying to replace desktops with mobile here. I think database administration is still going to be easier with a big monitor and a keyboard, and that's not going to change.
Rather I'm trying to open up database administration to people who don't have desktops, or who are more comfortable working on their phones.
I suppose having quick access to a database in case of emergency without having to rush to a computer, similar to how some people treat having SSH clients on their phones.
- When in the table explorer it's odd that the primary action - viewing a table - is behind a dropdown menu. maybe clicking the table name opens the browse rows screen and clicking a column opens with a select prefilled.
- Please default to a limit 500 or something like Jetbrains to prevent me making stupid mistakes.
Interesting project, I could see a use case for emerging markets where people don't have laptops. Maybe also include a local PG like https://supabase.com/blog/postgres-wasm for being able to play around with PG educationally with no required remote server?
For professional use cases, maybe if you're on call and need to access the DB over your phone (though I hope I'm never in that spot). Having documentation around network model - do you relay queries through your own backend - and the security model for data and credentials. Do you support any secure connection methods, like SSH tunnel, or does the PG need to be facing the public internet?
> Maybe also include a local PG like https://supabase.com/blog/postgres-wasm for being able to play around with PG educationally with no required remote server?
I did not know about wasm-postgres, thanks!
> Having documentation around network model - do you relay queries through your own backend - and the security model for data and credentials. Do you support any secure connection methods, like SSH tunnel, or does the PG need to be facing the public internet?
There's no backend, the app opens a connection directly to the database. Credentials are stored on-device. No data will ever be shipped to a third-party without user consent, and I will never change this. (This is a large part of why I haven't put in any "AI" features yet.)
The app currently does not support SSH tunneling. This is something I will be working on soon.
Also fair point on the documentation. There's currently 0 docs around the app, and I'm not proud of that.
I would note that, although obviously the confidentiality in TLS is based on public key cryptography, authentication by mTLS doesn’t reach the cryptography part.
The process starts with a client and server hello. Then the server sends its certificate to the client, and the client sends its certificate to the server. The server verifies that the client’s certificate is signed by a certificate authority in its trust store. That’s the authentication part. The client’s private key is not used.
The confidentiality comes next if authentication is successful.
I asked because X509 certificates are complex and difficult to securely parse. Also mTLS is rarely used.
This whole section is incorrect. It's called mutual TLS. The client's private key is used to prove to the server it has the private key for the public key it's handing to the server. Just like the server has to prove to the client, it has the private key to the public cert it hands out.
Otherwise there is no authentication going on at all.
See the RFC: https://www.rfc-editor.org/rfc/rfc8446 If you are unfamiliar with RFC's, see Section 4.4 and Appendix E.1, which talk about client auth and the handshake respectively.
> I asked because X509 certificates are complex and difficult to securely parse
Yes, but that's why PG relies on OpenSSL to do that work for them. It's widely deployed, even using client certificates. X.509 is used with client certificates by at least 3.5M active personnel with the US DoD via their Common Access Card, as one widely used example.
> Also mTLS is rarely used.
Mutual TLS or client auth is not often used in the browser context, because the browsers have miserable UX around it. I wish that would change, but I'm one of the very few.
It's regularly used outside of the browser context though. Lots of B2B and Service Oriented Architectures use it.
Without that there is still authentication: clients who don’t presents a certificate signed by CA are refused. A weaker form of authentication is who ever presents a signed certificate connects, regardless of whether they hold the private key or not. In practice, these two are packed into a p12 certificate anyways, at least browsers.
Interesting that defense industry uses mTLS. It’s a pitty because the UX could be good: no need to route the entire traffic by a VPN. Simply have a certificate in the browser and the user will have access with no further action or setup.
I've had to quickly access a dB from through the Termius mobile app one time, and it wasn't an experience I'd like to repeat, unless it's a really dire situation.
Fancy seeing a full-blown mobile Postgres editor. I can definitely see a few use cases but I'm curious whether your average Db admin or data engineer will be interested in using a tool like this.
I was just thinking about how a mobile client for an RDB would be cool to try for tracking workouts. There are plenty of CRUD apps for this but there is always some feature missing, whereas here you could customize to your delight.
I wonder what other apps are just RDB wrappers that could almost be substituted with something like this.
This looks great. There have certainly been times in my life where all I had was my phone, and I needed to check on a few things. I could see having an app like this handy "just in case" (assuming secure connectivity, of course). Good luck!
Also, several Postgres providers now also provide a SQL editor / runner and table visualizer in their UI.
What do Postgres users here think is the biggest missing thing in current clients? Are they too heavyweight? Too generic and don't support advanced Postgres features? Don't look modern enough? Not mobile friendly? Or is it something else?
I think people just really like Postgres, and like building tooling for it. Postgres is particularly easy to work with, thanks to its extensive documentation and its code being open-source.
It's always great to see new mobile apps that are text first/structured text interfaces/ide's on mobile, UI considerations in the space are still woefully underexplored.
I really dig this, I was even thinking it'd be possible to have some "smart suggestions" that could let people focus more on the logic/pattern of the overall problem they're trying to solve instead of having to assemble every single SQL command individually.
i.e. maybe there could be a searchable list of common sql solutions and then somehow adjust that to suit the actual problem (hopefully without ending up a cluttered mess of sql)
I haven't ruled out building AI-powered queries into the app, but I am firm about doing it in a way that respects data security (i.e. no shipping database schemas or data to ChatGPT without explicit user consent).
From my understanding, usable on-device LLM models tend to be gigabytes-large, which makes it difficult to roll out to everyone. Apple Intelligence might make this feasible, will need to do more research on this when I do the iOS port.
Yes, there's an option in the hamburger menu to edit queries manually, and that will allow you to type in (or paste in) the query by hand.
Re. the saved query restriction - I am planning to work on this app in the long term, which unfortunately means I have to monetise the app in order to sustain development work.
I believe restricting saved queries and saved connections is a good compromise to allow casual users to try out all the features the app has to offer, without imposing a time limit.
The key feature is the SQL query editor. The query editor was designed to be mobile-friendly. With autocomplete and a touch-friendly way to select parts of a SQL query, writing SQL statements with the query editor can - in some cases - be faster than typing the same query on a desktop.
The app supports the usual SQL client things:
- Browsing schemas, tables, and columns
- Running custom SQL statements
- Viewing results as a list, or as a table.
- Exporting results to CSV
- Saving queries (You can save one query in the free version)
The project is in very early stages, and is still missing a lot of features - notably the ability to insert, update, delete, or perform DDL via the query editor.
The app currently only supports Postgres, and is currently only available on Android.
Please give it a spin, and let me know if you have any feedback or feature requests.
Website: https://getselectable.com/
Play store: https://play.google.com/store/apps/details?id=net.weiyen.sel...