| От | John DeSoi |
|---|---|
| Тема | Re: COPY from stdin; |
| Дата | |
| Msg-id | 35c04e10f1d86e8883ac52174952271e@pgedit.com обсуждение |
| Ответ на | COPY from stdin; ("Peter Schonefeld" <peter.schonefeld@bigpond.com>) |
| Список | pgsql-novice |
On May 16, 2005, at 11:40 AM, Peter Schonefeld wrote: > Hi, I'm curious as to how to get the following snippet from a backup > file to > run as a script? > > COPY country (id, name) FROM stdin; > 1 Afghanistan > 2 Albania > 3 Algeria > 4 American Samoa > 5 Andorra > 6 Angola > Assuming you have tabs there between the values, just put it in a file and execute it with psql (same way it is used in a backup file). psql -f thefile database If you want to have other commands after this in the file, put \. on a line by itself after the last row: 6 Angola \. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера