Skip to content

Add lesson 33: Views and materialized views#93

Merged
exekias merged 2 commits into
mainfrom
lesson/33-views
Jul 10, 2026
Merged

Add lesson 33: Views and materialized views#93
exekias merged 2 commits into
mainfrom
lesson/33-views

Conversation

@exekias

@exekias exekias commented Jul 2, 2026

Copy link
Copy Markdown
Member

Adds Views and materialized views (roadmap item 01-views) — the new Module 8: Programmability.

Summary

Name and reuse a query as a virtual table with a view, or cache its result on disk with a materialized view.

Check

One query-returns check (customer-totals-view) — the learner creates a view and the check selects from it and compares the exact row.

Verified end-to-end against a non-superuser Postgres 16. npm run lessons:validate (34/34) and next build both pass.

Part of #6

🤖 Generated with Claude Code

Part of #6

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-postgres Ready Ready Preview Jul 10, 2026 8:06am

@exekias

exekias commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@copilot the check is failing, fix it

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@copilot the check is failing, fix it

Fixed in the latest commit. The issue was a YAML type mismatch: 1200.00 in YAML is parsed as the JavaScript number 1200, so String(1200) = "1200", but the database returns numeric column values as the string "1200.00". The comparison in rowsMatch then failed since "1200" !== "1200.00".

Fix: quoted the value as "1200.00" in lesson.yaml so js-yaml preserves it as a string, matching the DB output exactly.

@exekias exekias merged commit d4988ab into main Jul 10, 2026
3 checks passed
@exekias exekias deleted the lesson/33-views branch July 10, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants