I've been using Postgres.app to run PostgreSQL on my Mac for years. I like that it's easy to install, gives me a task tray icon to control it and means I don't have to run a full Docker environment just to hack on projects like my blog. …
In order to efficiently generate a GeoJSON representation of a vast number of locations, I'm currently experimenting with generating the GeoJSON directly inside a PostgreSQL SQL query using json_build_object()
and friends. …
The json_extract_path()
function in PostgreSQL can be used to extract specific items from JSON - but I couldn't find documentation for the path language it uses. …
django-sql-dashboard lets you define a SQL query plus one or more text inputs that the user can provide in order to execute the query. …
Here's a PostgreSQL SQL query that returns the closest locations to a point, based on a brute-force approach where the database calculates the distance (in miles) to every single row and then sorts by that distance. …
I wanted to grant a PostgreSQL user (or role) read-only access to a specific list of tables. …
This took me longer to figure out than I care to admit. …