Creating table columns from ???

From: Chadwick Rolfs <c2304182(at)webdevel(dot)urban(dot)csuohio(dot)edu>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Creating table columns from ???
Date: 2001-06-02 19:19:24
Message-ID: Pine.LNX.4.33.0106021511390.13197-100000@webdevel.urban.csuohio.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

That is, anything but by hand...
It seems that there is a missing function that would be very obvious and
one of the first things available:
here's what I want to do:
create table form_two ( <file with names and values> );
or even better, from perl, or php (I am now using Pg.pm)
create table form_two ( %hash_with_names_and_values );

How easy does this look? It seems that this would be though of already,
but the only way I see to make tables is this way...:

create table page_one (
spacer text null,
name text,
street text,
city text,
state text,
zip integer,
length integer,
yorm text,
phone text,
opt text,
fax text,
email text,
ceo text,
senior text,
comp text,
d_o_c date,
webPG text,
n_o_b text,
pge integer,
spacer2 text null
);
(doesn't this seem a bit cumbersome?)

And this is the smallest out of eleven forms (a small web site indeed.)
So what do all those people do with huge sites, and bigger forms? There
must be something I'm missing. Please, someone point it out to me, as
this project goes to the funders june 8.
I appreciate everyone's help in all matters, thank you.

Chadwick Rolfs

Browse pgsql-novice by date

  From Date Subject
Next Message Mohammed A 2001-06-02 22:21:42 monitoring
Previous Message Tom Lane 2001-06-02 14:06:41 Re: PG_DUMP fails to load back in