Interview Q&A / PostgreSQL

INTERVIEW Q&A · 69 QUESTIONS

PostgreSQL interview questions

Indexes, EXPLAIN, transactions and isolation, JSONB and the Postgres specifics backend interviews probe.

  1. Why should you use numeric instead of float or real for money in PostgreSQL?

    float and real are binary approximations that cannot represent values like 0.1 exactly, so sums drift. numeric stores exact decimal digits, which is what money needs. Many teams store paise as a bigint instead.

    BeginnerQuick answer1 min read