#194·questdb

Comment on table/column, PK/FK for ER diagrams

Author: igor-suhorukovCreated Apr 20, 2020Updated Sep 2, 2026
LabelsNew feature

Is your feature request related to a problem? Please describe.

Please support database structure documentation like other database do it. This is very helpful to generate DB documentation for large analytical database with ShemaSpy. Also add support of primary and foreign key(non enforced for check on operations) will be helpful for ER diagrams and as advise for query planner. Feature with low priority.

Describe the solution you'd like PostgreSQL comment example

COMMENT ON TABLE aircrafts_data IS 'Aircrafts (internal data)';
COMMENT ON COLUMN aircrafts_data.aircraft_code IS 'Aircraft code, IATA';

Foreign key example

ALTER TABLE ONLY flights
    ADD CONSTRAINT flights_aircraft_code_fkey FOREIGN KEY (aircraft_code) REFERENCES aircrafts_data(aircraft_code);

Describe alternatives you've considered Information schema ANSI object support

Additional context SchemaSpy documentation example, ER diagram example

There are another awesome free to use jdbc tools to visualize database ER diagram DbVisualizer.

To support this feature you need implement pg_catalog.pg_description table