How do I import table information?

From: Jeff Self <jself(at)greatbridge(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How do I import table information?
Date: 2001-01-18 17:57:47
Message-ID: Pine.LNX.4.30.0101181249230.13472-100000@j19.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to convert a package that uses MySQL as the database. When
installing the package, you have to create the database and then run the
following command: mysql database < database.sql. The database.sql
contains the sql statements for building tables. I'm trying to use this
file to build tables under PostgreSQL. But I'm getting an error because
there are comments in the file. If I remove the comments, the file works.
I am using the command: psql -e database < /home/dir/database.sql

An example of the database.sql is this:

# Table structure for table 'adminblock'
#

CREATE TABLE adminblock (
title character varying(60),
content text
);

# Dumping data for table 'adminblock'
#

INSERT INTO adminblock VALUES ('Administration','blah,blah,blah');

Is there a way to run this script without removing the comments?

Thanks.

--
Jeff Self
Information Specialist
Great Bridge, LLC
www.greatbridge.com | www.greatbridge.org
Norfolk, VA
(757)233-5570
jself(at)greatbridge(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-01-18 18:01:13 Re: [HACKERS] GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>
Previous Message Bruce Momjian 2001-01-18 17:51:48 Re: Re: JDBC Performance