Re: Nu-B\Column:Alter type
| От | Josh Berkus |
|---|---|
| Тема | Re: Nu-B\Column:Alter type |
| Дата | |
| Msg-id | web-700839@davinci.ethosmedia.com обсуждение исходный текст |
| Ответ на | Re: Nu-B\Column:Alter type (john-paul delaney <jp@justatest.com>) |
| Ответы |
Re: Nu-B\Column:Alter type
|
| Список | pgsql-novice |
> In your sequence below - where does the column (e.g. col 8 of 25) get
> changed?
Ooops.
Step 0.1: pg_dump -s -t bad_table > bad_table.sql
Step 0.2: Edit bad_table.sql to the table definition you want.
Step 0.3: Use the file bad_table.sql as your CREATE TABLE statement in
step 3.
> Would I list the good column names to insert into bad_table in point
> 4., then insert my new column - or is there a way to "select *
> except one" (I guess that's pretty lax SQL)?
Hmmm ... I thought that you wanted to change an existing column from
DATE to VARCHAR.
> > 1. CREATE TABLE temp1 AS
> > SELECT * FROM bad_table;
> > 2. DROP TABLE bad_table;
> > 3. CREATE TABLE bad_table;
> > 4. INSERT INTO bad_table SELECT * FROM temp1;
> > 5. DROP TABLE temp1
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
В списке pgsql-novice по дате отправления: