| От | Chuck Roberts |
|---|---|
| Тема | How to create tables and copy records in blocks? |
| Дата | |
| Msg-id | 69d6c77f985dd321ae473e6a5849f6ec@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: How to create tables and copy records in blocks?
|
| Список | pgsql-novice |
Source db has Postgresql 8.4. I want to copy some tables and records to Ubuntu 14.04 which has psql 9.3.
I need to create a test database, but I only need to copy some tables, with some of the records to the test system. I thought there was a way to dump the table layout as an SQL CREATE statement, then dump the records as INSERT statements. I'd like to dump 1000 records from each table at a time so as not to put a strain on the production server. So my job would run as a cron job at night.
I've Googled a bit on this but can't seem to find anything on this. How would I go about using SQL to do this? Is there another way to get blocks of 1000 records to a brand new test db which will be a subset of our prodution db?
Thank you.
Chuck
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера