Data Types
Self-test
Check your understanding
Self-test5 questions
—/5
When would you choose numeric over double precision, and what does it cost?
Why is timestamptz usually the right type for event times rather than timestamp?
What is the practical difference between json and jsonb, and which can be indexed with GIN?
When is an array column a reasonable choice, and when should it be a separate table?
- Design question
Design the columns for a payments table: amount, currency, status, created time, and a flexible metadata blob. Justify each type.