Keep the Lapak Desa shop site on a real Postgres: keyset pages, full-text search, jsonb, triggers. 16 levels, right in the browser.
LIMIT caps how many rows come back, OFFSET skips some rows first. Together they cut one long list into pages. In this game a real PostgreSQL 18 runs in your browser (PGlite). Each level makes a fresh database, runs your SQL, then plays one day of the shop’s traffic. What is graded is what Postgres returned and stored that day.
Postgres full-text search works with two types: tsvector (a document broken into words) and tsquery (the words searched for, joined with &, |, !). The @@ operator answers whether a document matches a query.
Extensions add types, functions and operators to Postgres: CREATE EXTENSION name;. PGlite ships many contrib extensions, and three of them are installed for this level.
Postgres converts a value to its column's type as it stores it. The wrong type can round, drop or refuse data without your app noticing.
A trigger runs a function whenever a table changes. Inside the function there is NEW (the row after), OLD (the row before) and TG_OP (INSERT, UPDATE or DELETE). A BEFORE trigger can change or cancel its row through what it returns.