pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Witney <awitney@sghms.ac.uk>
To: dlangschied <dlangschied@ameritech.net>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Creating schema for multiple tables/fields/indices.
Date: Thu, 24 Apr 2003 16:40:03 +0100
Message-ID: <BACDC3E3.178B6%a.witney@sghms.ac.uk> (raw)
In-Reply-To: <009601c30a76$f74e5330$6401a8c0@lcshost>


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@ameritech.net
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


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




view thread (4+ messages)  latest in thread

Message-ID: <BACDC3E3.178B6%a.witney@sghms.ac.uk>
Permalink:  ../BACDC3E3.178B6%25a.witney@sghms.ac.uk/
Also on:    postgresql.org/message-id/BACDC3E3.178B6%a.witney@sghms.ac.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: awitney@sghms.ac.uk, dlangschied@ameritech.net
  Subject: Re: Creating schema for multiple tables/fields/indices.
  In-Reply-To: <BACDC3E3.178B6%a.witney@sghms.ac.uk>
  References: <009601c30a76$f74e5330$6401a8c0@lcshost> <BACDC3E3.178B6%a.witney@sghms.ac.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox