Re: pg_dump: SQL command failed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thangalin <thangalin(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dump: SQL command failed
Date: 2012-05-14 03:26:27
Message-ID: 2618.1336965987@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thangalin <thangalin(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Suhad 2012-05-14 08:38:34 Fatal error in my PostgreSQL
Previous Message Thangalin 2012-05-14 02:52:24 Re: pg_dump: SQL command failed