table restruction

Поиск
Список
Период
Сортировка
От David M. Richter
Тема table restruction
Дата
Msg-id 3BA9C620.4164B047@dkfz-heidelberg.de
обсуждение исходный текст
Ответы Re: table restruct...  (Kovacs Baldvin <kb136@hszk.bme.hu>)
Список pgsql-sql
Hello!

I want to restructure a table called study.
this table has the following structure:

                       Table "study"
       Attribute        |          Type          | Modifier
------------------------+------------------------+----------
 chilioid               | character varying(80)  |
 instanceuid            | character varying(64)  |
 id                     | character varying(64)  |
 studydate              | date                   |
 studytime              | time                   |
 modality               | character varying(2)   |
 manufacturer           | character varying(128) |
 referingphysician      | character varying(128) |
 description            | character varying(128) |
 manufacturersmodelname | character varying(128) |
 importtime             | double precision       |
 chilisenderid          | character varying(80)  |
 accessionnumber        | character varying(64)  |
 institutionname        | character varying(128) |
 workflowstate          | character varying(8)   |
 flags                  | character varying(8)   |
 performingphysician    | character varying(128) |
 reportingphysician     | character varying(128) |
 parentoid              | character varying(80)  |

So , what I have to do is to move the column parentoid between chilioid
and instanceoid. After that operation parentoid is the second column in
the table study.

Can I do any restructuring in the running database or should I dump the
database and create a new changed schema and then put the data from the
dump back?
So this would spent a lot of time, otherwise it works sure.

Is there any oppertunity to restructure the existing database without
using a dump?

Thanks in advance

David
Вложения

В списке pgsql-sql по дате отправления:

Предыдущее
От: Haller Christoph
Дата:
Сообщение: Re: Selecting latest value
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Trigger Problem