Postgres, the Best Tool You're Already Using
summary
Shows concrete Postgres tricks: use text arrays plus the contains/overlaps operators to implement tagging and materialized-path hierarchies, compute depth with array_length and find parents/children via overlaps, enable the hstore extension (create_extension hstore) and prefer sql schema format to store and query sparse key/value metadata, and use full‑text search with to_tsvector('english', body) and to_tsquery while sanitizing user input, add a GIN index on the same to_tsvector expression, and beware tsquery wildcard and indexing gotchas.
AI-written summary · about
chapters (12)
- 0:00Start
- 1:41Tagging
- 4:38Contains Operator and the Overlaps Operator
- 8:34Model Hierarchies
- 11:01Array Length
- 12:26Find the Children of a Record
- 13:26The Parents of a Record
- 22:36Updating Age Stores
- 23:29Full Text Search
- 25:08Postgres Removes Common Stop Words
- 27:52Wildcard Matches
- 32:04Summary








