When was this table created? Greg dives into the 5 places where you can get information about Postgres object creation.
Greg is still working on some of the puzzles in the Advent of Code series. In this one he tackles some routes, shortest paths, and cost. These are great sample PostgreSQL functions withs some bonus tips on using pg_stat_user_functions to look at recursion.
New in Postgres 15, sequences can be unlogged. Greg reviews unlogged sequences and provides some details about using them.
Unlogged tables in Postgres can give you a big performance improvement but beware of the drawbacks. Here are some tips on how to safely give it a try.
Day 15 of AOC we have new hands on SQL for the Beacon Exclusion Zone. This one uses CTEs, sequences, regexp_substr() / regexp_match(), int4range, range_agg(), and an upsert.
Day 14 of AOC we have new hands on SQL for the Distress Signal. This one uses lag(), sequencing, regexp_replace(), and overlay().
Day 13 of AOC we have new hands on SQL for the Distress Signal. This one uses lag(), sequencing, regexp_replace(), and overlay().
Day 12 of AOC we have new hands on SQL for the Hill Climbing Algorithm. This one uses parsing, an IDENTITY column, functions, and text arrays.
Day 11 of AOC we have new hands on SQL for playing Monkey in the Middle. This one uses sequences, string functions, and window functions.
Day 10 of AOC we have new hands on SQL for reading signals. This one uses sequences and the OVER() function.
Day 9 of AOC we have new hands on SQL for looking at a rope bridge. This one uses a custom function and colored ASCII art.
Day 8 of AOC we have new hands on SQL for reviewing treetop views. This one uses includes plpgsql, row_number window functions, sequences, and regexp_split_to_table.
Day 7 of AOC we have new hands on SQL for reviewing terminal commands. This one uses recursive queries, text arrays and so many functions. Bonus, there are functions for regexp_count, regexp_replace, and regexp_substr which are new in Postgres 15.
Day 6 of AOC we have new hands on SQL detecting markers in datastreams. This one uses regexp_split_to_table, strpos, lag() functions and COUNT(DISTINCT). Also, a great example of using a DO function with RAISE NOTICE.
Day 5 of AOC we have new hands on SQL for helping stack crates. There are some cool plpgsql for moving things around. Plus generate_series(), upsert ON CONFLICT, and backwards sequencing.
Day 4 of AOC we have new hands on SQL for helping the Elves cleaning up camp. Postgres solutions include the function split_part(), the int4range data type, and range operators.
Day 3 of AOC we have lots of great SQL for organizing a rucksack. Postgres solutions for this one include functions for length(), left(), right(), regexp_replace(), COLLATE commands, window function lag(), and more.
Day 2 of AOC we have sql for transforming raw data into game analysis of paper, rock, scissors. Included is a nice custom function and great examples for IF/ELSE, CTEs, and more.
Greg is doing the Advent of Code using PostgreSQL and he is going to share a few of his tricks. Day 1 he uses file_fdw to connect to the text file provided. Along with a couple grouping and sum queries, he has a quick solution for you.
A guide on securing the pgBackRest user for high-security Postgres environments.