2

I want to show something like this with PostgreSQL but I don't know what I must searching for

enter image description here

can you explain to me how to show something like this with PostgreSQL ?

2 Answers 2

3

The image you shared is a graphical layout of tables. PostgreSQL doesn't produce such output, but you can get the layout of individual tables by running \d <tablename> in psql. This will provide you with the list of columns, column types, constraints, primary key, foreign keys and comments.

For example:

postgres=# \d catalogue
                               Table "public.catalogue"
   Column    |  Type   | Collation | Nullable |                Default
-------------+---------+-----------+----------+---------------------------------------
 id          | integer |           | not null | nextval('catalogue_id_seq'::regclass)
 item        | name    |           |          |
 qty         | integer |           |          |
 description | text    |           |          |
Indexes:
    "catalogue_pkey" PRIMARY KEY, btree (id)

Alternatively, if you require a GUI-based solution, check out PgAdmin: https://www.pgadmin.org/

Sign up to request clarification or add additional context in comments.

Comments

2

You can use dbeaver for this, using View Diagram option clicking in you schema

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.