How do I import table information?

Поиск
Список
Период
Сортировка
От Jeff Self
Тема How do I import table information?
Дата
Msg-id Pine.LNX.4.30.0101181249230.13472-100000@j19.us.greatbridge.com
обсуждение исходный текст
Ответы Re: How do I import table information?
Re: How do I import table information?
Список 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 по дате отправления:

Предыдущее
От: Patrick Aland
Дата:
Сообщение: Dropping a column
Следующее
От: "pblunat"
Дата:
Сообщение: Execute a string of command in sql'script