From: Albert REINER <areiner@tph.tuwien.ac.at>
To: pgsql-sql@postgresql.org
Subject: Re: Create tables in one query
Date: Thu, 23 Nov 2000 18:28:53 +0100
Message-ID: <20001123182853.B2673@frithjof> (raw)
In-Reply-To: <Pine.LNX.4.30.0011231136560.28835-100000@chapelperilous.net>
References: <00Nov23.150256met.40330@deuter.bhv.pl>
<Pine.LNX.4.30.0011231136560.28835-100000@chapelperilous.net>
On Thu, Nov 23, 2000 at 11:40:52AM -0500, bmccoy@chapelperilous.net wrote:
> On Thu, 23 Nov 2000, Tomasz Gralewski wrote:
>
> > I'd like to create a few tables in one SQL query, is that possible.
> > What tools I have to use, Perl, Tcl, or maybe is there block command
> > separator that I can write:
> > CREATE TABLE abd
> > (
> > a type,
> > b type,
> > c type
> > ) and I whant to add the next table here, how can I separate, by this (";"
> > that;s the end of table abd).
>
> Not sure what you are trying to do here. You can put statements like
...
> in a single file and load the file into psql via \i. That's I build all
> of my databases.
Or, if you are concerned with possible failures: enclose the series of
CREATEs in a transaction.
Albert.
--
--------------------------------------------------------------------------
Albert Reiner <areiner@tph.tuwien.ac.at>
Deutsch * English * Esperanto * Latine
--------------------------------------------------------------------------
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-sql@postgresql.org
Cc: areiner@tph.tuwien.ac.at
Subject: Re: Create tables in one query
In-Reply-To: <20001123182853.B2673@frithjof>
References: <00Nov23.150256met.40330@deuter.bhv.pl> <Pine.LNX.4.30.0011231136560.28835-100000@chapelperilous.net> <20001123182853.B2673@frithjof>
* 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