| От | Craig James |
|---|---|
| Тема | Re: restore |
| Дата | |
| Msg-id | 4CAB8F9B.70401@emolecules.com обсуждение исходный текст |
| Ответ на | restore (Dinesh Bhandary <dbhandary@iii.com>) |
| Список | pgsql-admin |
On 10/5/10 11:08 AM, Dinesh Bhandary wrote: > Hi All, > > Is there an easy way to restore to a new table where the column name have been changed but data remains the same? > For example I am trying to restore from existing system, table1(col1) to table1(col2) and it is erroring out on the newcolumn name even though it is a data only restore. I was just wondering if there is a quick way to bypass this. Let meknow. If your data file is plain text with a COPY or INSERT commands, do this using psql: begin; alter table1 rename col2 to col1; \i datafile.sql alter table1 rename col1 to col2; commit; Craig
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера