Re: Importing Database

From: Lee Harr <missive(at)frontiernet(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Importing Database
Date: 2002-06-25 00:32:18
Message-ID: af8dmh$1c35$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> When I type less 20020422_project_summaries.gz, I get the
> text of the database of this file. So it seems that it's already unzipped
> but has the .gz extension. how do I import this file
> as a database into postgresql? I'm running cygwin and pgAdmin II
> on a win2k computer.
>

I am no w2k or cygwin expert, but you could try:

cd /dir/where/20020422_... exists
psql
create database my_new_db;
\c my_new_db
\i 20020422_project_summaries.gz

This sort of assumes that file is from pg_dump and is not
just a csv (or some other format) of plain data.
If it is just data, you would need to create your
table structure, then \copy or COPY the data in to
the tables.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Nick Fankhauser 2002-06-25 01:57:30 Re: Importing Database
Previous Message Tom Lane 2002-06-24 22:55:22 Re: Slow Remote connection