Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id C938B475AB7 for ; Mon, 24 Jun 2002 21:26:11 -0400 (EDT) Mailbox-Line: From missive@frontiernet.net Mon Jun 24 21:26:11 2002 Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id DBB6F4766ED for ; Mon, 24 Jun 2002 20:32:35 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 6EF823818F8; Mon, 24 Jun 2002 20:32:18 -0400 (EDT) From: Lee Harr X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Importing Database Date: Tue, 25 Jun 2002 00:32:18 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 22 Message-ID: References: <1024932612.3d173b04c5821@webmail.mit.edu> Reply-To: missive@hotmail.com X-Complaints-To: news@hub.org User-Agent: slrn/0.9.7.3 (FreeBSD) To: pgsql-admin@postgresql.org X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.30 X-Spam-Level: X-Archive-Number: 200206/201 X-Sequence-Number: 4635 > 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.