pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lee Harr <missive@frontiernet.net>
To: pgsql-admin@postgresql.org
Subject: Re: Importing Database
Date: Tue, 25 Jun 2002 00:32:18 +0000 (UTC)
Message-ID: <af8dmh$1c35$1@news.hub.org> (raw)
References: <1024932612.3d173b04c5821@webmail.mit.edu>

> 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.






view thread (4+ messages)  latest in thread

Message-ID: <af8dmh$1c35$1@news.hub.org>
Permalink:  ../af8dmh$1c35$1@news.hub.org/
Also on:    postgresql.org/message-id/af8dmh$1c35$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: missive@frontiernet.net
  Subject: Re: Importing Database
  In-Reply-To: <af8dmh$1c35$1@news.hub.org>
  References: <1024932612.3d173b04c5821@webmail.mit.edu> <af8dmh$1c35$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox