Re: Dump schema without the functions - Mailing list pgsql-general

From Richard Huxton
Subject Re: Dump schema without the functions
Date
Msg-id 47A30F01.2040301@archonet.com
Whole thread Raw
In response to Re: Dump schema without the functions  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Responses Re: Dump schema without the functions
List pgsql-general
Stefan Schwarzer wrote:
>>> 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.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Enrico Sirola
Date:
Subject: arrays of floating point numbers / linear algebra operations into the DB
Next
From: "Rubén Rubio"
Date:
Subject: Log query statistics