Re: Creating schema for multiple tables/fields/indices.

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: dlangschied <dlangschied(at)ameritech(dot)net>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Creating schema for multiple tables/fields/indices.
Date: 2003-04-24 15:40:03
Message-ID: BACDC3E3.178B6%a.witney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


If you have the CREATE statements all written out in one file (eg
create_stuff.sql)

psql <dbname> <username> < create_stuff.sql

Or you could connect with psql and type

\i create_stuff.sql

> I just downloaded postgreSQL. I have finished the install and everything
> looks okay. I am now ready to create a db and add tables/fields/indices. I
> have approx. 100 tables 2,000 fields and 500 indices. Before I spend an
> ungodly amount of time doing these individually, can I load an entire schema
> via some scripting method?
>
> Sincerely,
>
> David Langschied
> Langschied Consulting Services
> 25644 Mackinac
> Roseville, MI 48066
>
> Phone: (586)777-7542
> Cell: (248)789-8493
> e-mail: dlangschied(at)ameritech(dot)net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-04-24 15:41:15 Re: Rename constraint?
Previous Message dlangschied 2003-04-24 15:34:15 Creating schema for multiple tables/fields/indices.