postgresql

11 posts tagged “postgresql”.

  1. 2025
  2. Critical lessons from implementing a highly complex workflow system

    - Transaction Boundaries are Sacred: When spawning child tasks, the parent MUST commit its transaction before children become visible to workers.

    1 min read
  3. Granting a PostgreSQL user read-only access to some tables

    I wanted to grant a PostgreSQL user (or role) read-only access to a specific list of tables. I created the role using the Heroku PostgreSQL web console. Having done that, it had the name .

    1 min read
  4. Embedding paragraphs from my blog with E5-large-v2

    Xeophon suggested that E5-large-v2 as an embedding model that was worth a closer look. It's an interesting model. It's trained to match queries against passages of text.

    6 min read
  5. Closest locations to a point

    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…

    1 min read
  6. 2024
  7. Upgrade Postgres.app on macOS

    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…

    1 min read
  8. Show the SQL schema for a PostgreSQL database

    This took me longer to figure out than I care to admit. pg dump -s name-of-database Surprisingly there doesn't seem to be an easy way to do this using a statement within PostgreSQL itself.

    1 min read
  9. Using unnest() to use a comma-separated string as the input to an IN query

    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.

    1 min read
  10. 2023
  11. Constructing GeoJSON in PostgreSQL

    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 and…

    1 min read
  12. Enabling a gin index for faster LIKE queries

    I tried using a gin index to speed up queries against a column. PostgreSQL: More performance for LIKE and ILIKE statements provided useful background.

    1 min read
  13. Using json_extract_path in PostgreSQL

    The function in PostgreSQL can be used to extract specific items from JSON - but I couldn't find documentation for the path language it uses.

    1 min read
  14. Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine

    I like using Postgres.app to run PostgreSQL on my macOS laptop. I use it for a bunch of different projects.

    1 min read