######octothorp.es

#nosql

  • Managing Key/Value Pairs in PostgreSQL

    https://justatheory.com/2010/08/postgres-key-value-pairs/

    Let’s say that you’ve been following the latest research in key/value data storage and are interested in managing such data in a PostgreSQL database. You want to have functions to store and retrieve pairs, but there is no natural way to represent pairs in SQL. Many languages have hashes or or data dictionaries to fulfill this role, and you can pass them to functional interfaces. SQL’s got nothin’. In PostgreSQL, have two options: use nested arrays (simple, fast) or use a custom composite data type (sugary, legible).

    Follow #nosql on RSS or use the

    JSON API
    
    curl -X GET \
      -H "Content-type: application/json" \
      -H "Accept: application/json" \
      "https://octothorp.es/~/nosql"