Re: Dump schema without the functions
От | Stefan Schwarzer |
---|---|
Тема | Re: Dump schema without the functions |
Дата | |
Msg-id | E29676A3-2541-4BA6-9EE4-85F09844CE2E@grid.unep.ch обсуждение исходный текст |
Ответ на | Re: Dump schema without the functions (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: Dump schema without the functions
|
Список | pgsql-general |
>>>> how can I dump a schema with all tables, but without the functions? >>> >>> There's no built-in single command for that. You can accomplish >>> it by >>> using pg_restore -l to make a list of objects, then edit the list, >>> then pg_restore -L to restore only the objects in the edited list. >> Hmmm.. I probably should have mentioned that it's not a "normal" >> dump, but one including imported shapefiles. So my dump comes from >> this: >> pg_dump -Fc ... >> and - sorry, myself not being an expert - it seems to me that this >> file is not editable anymore. > > No, but if you run pg_restore -l <my_dump_file> that will output a > list of objects that IS editable. Then pg_restore -L ... will only > restore the items in that list. Ah, ok. Right, I can see that. But I don't really get how the final command will look like. pg_restore -L <file_without_FUNCTIONS> -d <my_database> But somewhere I have to indicate the original file, no? I mean, where do all my data now come from? The original dump contains all data; the newly created via pg_restore -l geodataportal.public | grep -v FUNCTION > pgdump.geodataportal.public.no-func has only the TOC. But no data... Thanks for any advice. Stef
Вложения
В списке pgsql-general по дате отправления: