PostgreSQL: Importing data from your computer to PostgreSQL
This documentation is part of the Getting started guide. View the full guide here: How to get started with PostgreSQL.
👋 Welcome to the Stackhero documentation!
Stackhero provides a fully managed PostgreSQL cloud service, designed for reliability and speed:
- Unlimited connections and data transfers for seamless scaling.
- PgAdmin web UI included for intuitive database management.
- Popular extensions included, such as
PostGIS,TimescaleDB, andPgVector.- Simple, one-click updates keep your database secure and current.
- High performance and strong security on private, dedicated infrastructure.
You can get started with Stackhero's PostgreSQL cloud hosting in just a few minutes. Enjoy a reliable database experience and save valuable time managing your data.
One of the simplest ways to import data from your computer to your PostgreSQL instance is to use the PostgreSQL CLI. On your computer, run the following command (replace <DB_NAME> with your database name and data.pgsql with the name of your SQL file):
psql \
--host=<XXXXXX>.stackhero-network.com \
--username=admin \
--port=<PORT> \
--dbname=<DB_NAME> \
< data.pgsql