Blog
Generate a Random String in Hugo
I recently fixed an issue where I needed to generate a random string. The string had to be random, even if given the same input seed.
Find All Tables That Do Not Have a Given Column in Postgres
If you have hundreds of tables, it can be a pain to search each individual one to check if it has a given column. This query left joins all tables for a given schema, <some_schema>, against itself, then shows tables that do not have a given column, <some_column>.
Add Search Functionality to Your Blog Listing Page
Note: An improved version of this template is available at https://github.com/zwbetz-gh/hugo-client-side-search-template. It supports fuzzy searching and match highlighting.
Strawberry Ice Cream Recipe
Don’t take it too seriously. Experiment, experiment, experiment.
Grant Current and Future Objects to a User (Role) in Postgres
Ran into an issue at work with one of our flyway scripts. The script was somewhere in the middle of the migration order, so it wasn’t the first or the last script to run. This was an issue since we needed to grant read-only access to a some_user user for both current and future tables that were created. After a bit of tinkering, I came to the below solution.
Total blog posts: 220