Describe the bug
The FK redirection button, the action that opens the referenced record/table from a foreign key value cell, works in some PostgreSQL connections but not others.
In affected databases:
- no FK button is rendered
- no related-record panel opens
- no visual feedback or error is shown
- foreign keys appear to not be loaded at all
Root Cause
The PostgreSQL FK discovery query based on information_schema was not returning FK metadata consistently in some environments/connections.
Because the application could not detect the table foreign keys correctly, the FK navigation button and related-record preview actions were never rendered in the UI.
Proposed Fix
Replace the existing information_schema FK query with a pg_catalog implementation that reads PostgreSQL internal system tables directly (pg_constraint, pg_attribute, unnest).
This approach is more reliable and less dependent on information_schema behavior, restoring consistent FK discovery across environments/connections.
Changes
src/drivers/postgres/mod.rs — replaced FK metadata query
To Reproduce
- Connect to a PostgreSQL database containing valid foreign keys
- Open a table that contains FK columns
- Observe that FK metadata is not loaded in some environments/connections
- Notice the FK navigation button and related-record preview actions are missing from FK value cells
Notes
The issue appears to depend on how the information_schema FK query behaves for specific PostgreSQL environments/connections. Replacing the query with a pg_catalog implementation consistently restores FK discovery.
OS Version
CachyOS (Kernel 7.0.9)
Tabularis Version
v0.11.0
Describe the bug
The FK redirection button, the action that opens the referenced record/table from a foreign key value cell, works in some PostgreSQL connections but not others.
In affected databases:
Root Cause
The PostgreSQL FK discovery query based on
information_schemawas not returning FK metadata consistently in some environments/connections.Because the application could not detect the table foreign keys correctly, the FK navigation button and related-record preview actions were never rendered in the UI.
Proposed Fix
Replace the existing
information_schemaFK query with apg_catalogimplementation that reads PostgreSQL internal system tables directly (pg_constraint,pg_attribute,unnest).This approach is more reliable and less dependent on
information_schemabehavior, restoring consistent FK discovery across environments/connections.Changes
src/drivers/postgres/mod.rs— replaced FK metadata queryTo Reproduce
Notes
The issue appears to depend on how the
information_schemaFK query behaves for specific PostgreSQL environments/connections. Replacing the query with apg_catalogimplementation consistently restores FK discovery.OS Version
CachyOS (Kernel 7.0.9)
Tabularis Version
v0.11.0