~/talk

Revitalizing Outdated Data Models with PostgreSQL Views

Talkat POSETTE: An Event for Postgres 2024 · 2024-06-11..06-13· [databases]
linkedin:newvick-lee
slides:none on file

Claims that PostgreSQL Views can modernize a messy polymorphic schema without migrations, using only views plus optional triggers and parameters. Demonstrates creating a chicken_in_large_barn view that renames animal_id and barn_id to chicken_id and large_barn_id, shows that simple views are automatically updatable when they meet PostgreSQL’s rules, and adds a trigger function that hardcodes types on insert so nulls never occur. Recommends WITH CHECK OPTION and security_invoker for integrity and access control.

AI-written summary · about

  1. 0:00Intro
  2. 2:06Case Study
  3. 6:31What is a PostgreSQL View?
  4. 8:16Creating a view
  5. 11:49Updatable views
  6. 14:00Using triggers to augment updates
  7. 19:07Useful parameters
  8. 21:43Views vs Materialized Views
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.