From: | "Gregory Wood" <gregw(at)com-stock(dot)com> |
---|---|
To: | "Rich Shepard" <rshepard(at)appl-ecosys(dot)com> |
Cc: | "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: creating tables from a disk file |
Date: | 2002-02-19 16:54:16 |
Message-ID: | 007001c1b966$11e6ddb0$7889ffcc@comstock.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
psql -f myschema.sql mydb
----- Original Message -----
From: "Rich Shepard" <rshepard(at)appl-ecosys(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, February 19, 2002 10:54 AM
Subject: [GENERAL] creating tables from a disk file
> I have created the database schema as a text file. It contains all the
> CREATE TABLE comands with the fields and their constraints. But, I cannot
> find a command that will have postgres accept this file and create the
> tables for me.
>
> The COPY (\copy) commands are only for data and so is INSERT. CREATE
TABLE
> does not appear to have an option by which a disk file can be specified.
>
> Is there a way of having the postmaster read the specifications and
create
> the tables, or do I re-enter them all from within psql?
>
> TIA,
>
> Rich
>
> Dr. Richard B. Shepard, President
>
> Applied Ecosystem Services, Inc. (TM)
> 2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
> + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) |
rshepard(at)appl-ecosys(dot)com
> http://www.appl-ecosys.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Emberson | 2002-02-19 17:21:56 | testing PL/pgsql functions |
Previous Message | Stephan Szabo | 2002-02-19 16:53:54 | Re: [SQL] inheritance and foreign key |