Use ON CONFLICT to atomically insert or update rows based on unique constraints. Specify the exact conflict target, handle duplicate input rows, and understand that excluded values replace, not accumulate.
postgresql / sql / upsert / insert / on-conflict / unique-constraint / concurrency / database
Compare RESTRICT, CASCADE and SET NULL using a small isolated example, then check the actual constraint and dependent rows before changing real data.
PostgreSQL / SQL / Foreign keys / Transactions
Understand the differences between offset-based and cursor-based pagination and when to use each, especially when dealing with frequently changing datasets.
api / pagination / rest / offset / cursor / data consistency / web development
Diagnose repeated JOIN rows by counting matching keys, checking constraints and choosing whether the result should contain orders, items or summaries.
SQL / JOIN / PostgreSQL