How do I import table information? - Mailing list pgsql-general

From Jeff Self
Subject How do I import table information?
Date
Msg-id Pine.LNX.4.30.0101181249230.13472-100000@j19.us.greatbridge.com
Whole thread Raw
Responses Re: How do I import table information?
Re: How do I import table information?
List 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@greatbridge.com


pgsql-general by date:

Previous
From: Patrick Aland
Date:
Subject: Dropping a column
Next
From: "pblunat"
Date:
Subject: Execute a string of command in sql'script