Document Storage Gymnastics with Postgres

With the release of Postgres 9.4 came the additional datatype jsonb. This is binary JSON, the same type of thing that MongoDB uses for internal storage. Postgres has had the json data type for a...

Embracing SQL In Postgres

One thing that drives me absolutely over the cliff is how ORMs try so hard (and fail) to abstract the power and expressiveness of SQL. Before I write further let me say that Frans Bouma reminded me...

Inserting And Using A New Record In Postgres

A Problem Postgres Can Solve Easily Let’s say you need to insert a record into a table and then use that record immediately to push data into another table. This happens a lot with parent/child...

Using Custom Types in Postgres

Using Types For Fun and Profit In my last post about pulling documents from queries I showed an interesting way to return a result set using row_to_json to crunch down 1-many records into a JSON...

A Better ID Generator For PostgreSQL

The GUID Problem When developers think about a globally-unique identifier, they usually think of UUIDs (or GUIDs) and will then create a table with a GUID as a primary key. This is problematic if...

PostgreSQL Rising

Postgres.app Some buzz going around the web today about Postgres.app. Most people don’t understand why it’s interesting – so here’s a quick explanation. Postgres can be...