Let's try to mimic the following belongs_to relationship with counter_cache behavior in Postgres! tldr - jump to the summary below! class Comment < ActiveRecord::Base belongs_to :post, counter_cache: true end class…
While experimenting with building a simple Twitter clone in Postgres, I found that I needed a way to parse hashtags and mentions from tweets like: #example tweet - #testing with @postgresql Imagine that we have…
Lately I've been experimenting with building a simple "twitter" app in Postgres by pushing as much logic in the database layer as possible. This includes data validation/sanitization, triggers, and functions. I needed a way…