question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some Postgres relationships don't show on table focussed ER diagrams

See original GitHub issue

Version 4.0.x (first noticed in the last 3.8.x release) For Postgres connections only the main schema ERD shows all relationships. When selecting a table, the ERD only shows relationships owned by the table (for MySQL the views work as expected showing both types):

Some Postgres examples: For the main database ERD view, the files_file table has many outgoing relationships: screen shot 2017-04-09 at 14 35 04

when viewed from files_file table focus, no connections are shown. screen shot 2017-04-09 at 14 35 28

Another example where the main view shows 2 connections on the actions_email_attatchments table: screen shot 2017-04-09 at 14 48 16

When viewed from the actions_email_attatchments table view the connections are shown: screen shot 2017-04-09 at 14 35 38

Finally a mixed example where both types of FKs are on the table: screen shot 2017-04-09 at 14 36 32 When this table is viewed in focus only the owned FKs are shown: screen shot 2017-04-09 at 14 36 41


For comparison, here is an example from MySQL working as expected in a similar context. The main ERD shows all connections: screen shot 2017-04-09 at 14 59 55 And in the table focussed ERD the connections and associated tables still show up: screen shot 2017-04-09 at 15 00 11

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Apr 9, 2017

Thanks for detailed report. I did find the bug (it was in schema constraints/indexes caching function), it’ll be fixed in the next version.

0reactions
markk-fmicommented, Apr 23, 2021

I have a similar (maybe worse?) issue with DBeaver 21.0.2.202104042040 and postgres-db, but not with an oracle-db.

In postgres, if I click a table from the tree, the ER-Diagram shows ONLY that table and NO foreign key relationships, even ones owned by the table. But if I click the schema, all tables with fk relationships are shown. E.g. see images below.

In oracle, if I click a table from the tree, the ER-Diagram shows that table in the center with all fk relationships shown in the diagram.

schema-pg

table-pg

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generate the ERD for an existing database - Stack Overflow
i want to visualize the relationships between tables of the existing schema. – Badr · @ALL is there any add-on for pgadmin III...
Read more >
Data Modeling with ERD features in pgAdmin - SQLShack
In this article, we will learn how to use the ERD Project feature of pgAdmin to work with an instance of Azure Database...
Read more >
How to represent foreign key in an ER diagram?
ER Diagrams were originally used only to represent the ER model. The ER model does not use foreign keys to represent relationships.
Read more >
TIL: about Entity Relationship Schemas - DEV Community ‍ ‍
We gathered notes on a few tools to interact with diagrams as code and show where they can be used. Diagram-as-code, or not....
Read more >
How to choose your Entity-Relationship Diagram (ERD)
They often are not strictly Entity-Relationship Diagrams but take them as inspiration to show tables and relations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found