Обсуждение: Errors with pg_dump

Поиск
Список
Период
Сортировка

Errors with pg_dump

От
Andre Schubert
Дата:
Hi all,

i have a little problem with dumping and restoring my databases.
It seems that if i dump a schema from a database then that data
were dumped in wrong order.
For example, i have plpgsql-functions used for check-constraints
in some tables.
The create function statements come after the create table statement
of the table using this function as check-constraint.
The same behavior with views.
I have some views were the create view statement comes before the
create table statement in the dumped file.

Are these errors known or do i have misconfigured pg_dump?

Regards, as

Re: Errors with pg_dump

От
"Gaetano Mendola"
Дата:
"Andre Schubert" <andre.schubert@km3.de> wrote in message
news:20020828103531.0abf145b.andre.schubert@km3.de...
> Hi all,
>
> i have a little problem with dumping and restoring my databases.
> It seems that if i dump a schema from a database then that data
> were dumped in wrong order.
> For example, i have plpgsql-functions used for check-constraints
> in some tables.
> The create function statements come after the create table statement
> of the table using this function as check-constraint.
> The same behavior with views.
> I have some views were the create view statement comes before the
> create table statement in the dumped file.
>
> Are these errors known or do i have misconfigured pg_dump?

From the documentation:

[SNIP]
9.1.4. Caveats
pg_dump (and by implication pg_dumpall) has a few limitations which stem
from the difficulty to reconstruct certain information from the system
catalogs.
Specifically, the order in which pg_dump writes the objects is not very
sophisticated. This can lead to problems for example when functions are used
as column default values. The only answer is to manually reorder the dump.
If you created circular dependencies in your schema then you will have more
work to do.
For reasons of backward compatibility, pg_dump does not dump large objects
by default. To dump large objects you must use either the custom or the TAR
output format, and use the -b option in pg_dump. See the reference pages for
details. The directory contrib/pg_dumplo of the PostgreSQL source tree also
contains a program that can dump large objects.

[SNIP]


Ciao
Gaetano