The VIEW SCHEMA command lets you inspect tables, columns, and data types inside a ParadeDB schema directly from SQL or psql.
Inspecting a schema helps you confirm table structures, troubleshoot query errors, and plan migrations without guessing column names or data types.
In psql
run \dt sales.*
to list everything in the sales
schema. With pure SQL use:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'sales';
Meta-command: \d+ sales.Orders
. SQL alternative:
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_schema = 'sales' AND table_name = 'Orders';
Use a single query that aggregates column info:
SELECT table_name, json_agg(json_build_object('column', column_name,
'type', data_type)) AS columns
FROM information_schema.columns
WHERE table_schema = 'sales'
GROUP BY table_name;
Set SET search_path = sales, public;
first so unqualified names resolve. Add LIMIT
when querying large catalog tables to avoid client overload.
See below for typical errors and fixes.
Yes—tools like Galaxy or TablePlus render schemas visually, but under the hood they run the same catalog queries shown here.
No. Reading from catalog views is non-blocking and safe in production.
Run \d+ schema.table
for a full summary or query pg_indexes
and information_schema.table_constraints
.