From: | <bmccoy(at)chapelperilous(dot)net> |
---|---|
To: | Tomasz Gralewski <tg(at)bhv(dot)pl> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Create tables in one query |
Date: | 2000-11-23 16:40:52 |
Message-ID: | Pine.LNX.4.30.0011231136560.28835-100000@chapelperilous.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
CREATE TABLE (
...
);
CREATE TABLE (
...
);
CREATE INDEX ... ;
GRANT SELECT... ;
in a single file and load the file into psql via \i. That's I build all
of my databases.
Brett W. McCoy
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
A bachelor is a selfish, undeserving guy who has cheated some woman out
of a divorce.
-- Don Quinn
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-11-23 17:26:49 | Re: [INTERFACES] PQendcopy: resetting connection error |
Previous Message | Tom Lane | 2000-11-23 16:22:44 | Re: Help with displaying data types. |