1. Which PostgreSQL feature stores semi-structured documents efficiently?
- BLOB-only tables
- CSV columns
- JSONB
- Spreadsheet links
जवाब देखें
जवाब: JSONB
JSONB is binary, indexable JSON.
पाठ: What PostgreSQL Is
PostgreSQL कोर्स के 25 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।
जवाब: JSONB
JSONB is binary, indexable JSON.
पाठ: What PostgreSQL Is
जवाब: \d table_name
Backslash commands are psql features.
जवाब: numeric
Money needs exact decimals.
पाठ: Choosing Data Types
जवाब: FOREIGN KEY
Referential integrity.
जवाब: Returns columns from the rows affected by the statement
Get generated values without another round trip.
जवाब: Excludes them, because the comparison is unknown
Use IS DISTINCT FROM for NULL-aware comparisons.
जवाब: No
Specify the order you need.
जवाब: LEFT JOIN from customers to orders
Left joins keep all left rows.
पाठ: Joins
जवाब: In HAVING
HAVING works on aggregated groups.
जवाब: A named intermediate result defined with WITH
Readable, composable queries.
पाठ: CTEs and Subqueries
जवाब: They compute across rows while keeping every row in the result
Aggregates without collapsing.
पाठ: Window Functions
जवाब: ->>
-> returns jsonb, ->> returns text.
पाठ: JSONB
जवाब: The row that was proposed for insertion
Combine existing and proposed values.
जवाब: PostgreSQL reads every row of the table
Fine for small tables, costly for selective lookups on big ones.
जवाब: It only includes rows matching its WHERE condition
Index only what queries need.
जवाब: GIN
Inverted indexes for element lookups.
जवाब: It is aborted until you roll back (or roll back to a savepoint)
Errors must be handled explicitly.
जवाब: Yes, each statement sees the latest committed data
Each statement gets a new snapshot.
पाठ: Isolation Levels
जवाब: Locks the selected rows until the transaction ends
Serialise read-modify-write on a row.
जवाब: Superuser privileges
Least privilege limits damage.
पाठ: Roles and Privileges
जवाब: Table owners bypass RLS by default
Make sure policies actually apply.
पाठ: Row-Level Security
जवाब: Regularly testing restores
A backup is only as good as its restore.
पाठ: Backup and Restore
जवाब: Long-running or idle-in-transaction sessions
Old snapshots keep old row versions alive.
जवाब: It builds the index without blocking writes to the table
Avoid long write locks.
जवाब: Indexes are checked against real queries with EXPLAIN
Correct types, constraints and verified plans.