Import

PostgreSQL

Learn how to import existing database schemas into StackRender using tools like pg_dump and pgAdmin. Convert your SQL schema into a visual ERD diagram in seconds.

You can import an existing PostgreSQL database schema into StackRender using the pg_dump utility.

Install pg_dump

Download and install PostgreSQL tools, which include the pg_dump utility. This tool allows you to export your database schema.

Export the Database Schema

Run the following command in your terminal to export only the database schema (without data):

pg_dump -U [username] -d [database_name] --schema-only -f [output_file.sql]

Example:

pg_dump -U root -d example_db --schema-only -f example_db.sql

Import into StackRender

Open the generated .sql file, copy its contents, and paste them into the Import SQL section in StackRender. Then click Import to generate the diagram.

You can also export a PostgreSQL database schema using pgAdmin and import it into StackRender.

Open pgAdmin

Launch pgAdmin and connect to your PostgreSQL server.

Start the Backup Process

Right-click the database you want to import and select Backup from the context menu.

Configure the Export

In the backup dialog:

  • Name your export file with the .sql extension
  • Set Format to Plain
  • Choose Encoding: UTF8

Export Schema Only

Go to the Data Options tab and configure the following:

  • Enable Only schema
  • Disable Only data

This ensures that only the database structure is exported without table records.

Import into StackRender

Click Backup to generate the .sql file.
Open the file, copy its contents, and paste them into the Import SQL section in StackRender, then click Import to generate the diagram.