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. What is the difference between -> and ->> in PostgreSQL JSONB queries?

    -> returns the value as jsonb (so you can keep navigating), while ->> returns it as text. Use ->> when comparing to strings or showing a value, and cast it for numbers.

    BeginnerQuick answer1 min read