Re: pg_dump: SQL command failed - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_dump: SQL command failed
Date
Msg-id 2618.1336965987@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump: SQL command failed  (Thangalin <thangalin@gmail.com>)
Responses Re: pg_dump: SQL command failed
List pgsql-bugs
Thangalin <thangalin@gmail.com> writes:
> 4. Dump the schema using pg_dump:
> pg_dump -n *superschema* --inserts *superdatabase* > superduper.sql

This does not dump the extension, because the extension is not within
the schema "superschema".  (It definitely isn't given your creation
command, but pg_dump doesn't consider that extensions are inside schemas
anyway, for the purposes of options such as "-n".)  So on reload, the
user function fails; it's referencing a function that doesn't exist
in the new database.  That's not a bug.

BTW, the reason the unaccent function isn't marked immutable is that its
behavior can be changed with ALTER TEXT DICTIONARY.  This wrapper
function doesn't eliminate that risk (in fact it adds some new ones),
so it doesn't look very safe to me.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Thangalin
Date:
Subject: Re: pg_dump: SQL command failed
Next
From: "Suhad"
Date:
Subject: Fatal error in my PostgreSQL