How do I use text script containing SQL? - Mailing list pgsql-sql

From Jeff S.
Subject How do I use text script containing SQL?
Date
Msg-id 20010305185600.44574.qmail@web12702.mail.yahoo.com
Whole thread Raw
Responses Re: How do I use text script containing SQL?
Re: How do I use text script containing SQL?
List pgsql-sql
I want to build my tables by placing all the sql
statements in a file. What is the correct way to use
this file with psql?

Example: My text file has this in it:

CREATE TABLE table1 (  table1_id serial,  field1  char(5),  PRIMARY KEY (table1_id)
);

I want to be able to use the file to create my table.
I've tried psql -d databasename -e < filename.txt
but that doesn't work.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/


pgsql-sql by date:

Previous
From:
Date:
Subject: count number of weeks??
Next
From: clayton cottingham
Date:
Subject: Re: How do I use text script containing SQL?