Re: How do I import table information?

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: Jeff Self <jself(at)greatbridge(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I import table information?
Date: 2001-01-18 19:04:53
Message-ID: 20010118190453.C24380@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 18, 2001 at 12:57:47PM -0500, Jeff Self wrote:
..
> 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'
> #
...
> Is there a way to run this script without removing the comments?

How about

sed s/^#/--/

to get the standard SQL comment character(s)?

Cheers,

Patrick

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yohans Mendoza 2001-01-18 19:29:00 character sets
Previous Message Tom Lane 2001-01-18 19:02:57 Re: How do I import table information?