From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thangalin <thangalin@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_dump: SQL command failed
Date: Sun, 13 May 2012 23:26:27 -0400
Message-ID: <2618.1336965987@sss.pgh.pa.us> (raw)
In-Reply-To: <CAANrE7pEvWk9LBvEK8kHLOsMNiDGgumVB=gYRMojtdPc6UCO6Q@mail.gmail.com>
References: <CAANrE7pEvWk9LBvEK8kHLOsMNiDGgumVB=gYRMojtdPc6UCO6Q@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, thangalin@gmail.com
Subject: Re: pg_dump: SQL command failed
In-Reply-To: <2618.1336965987@sss.pgh.pa.us>
References: <CAANrE7pEvWk9LBvEK8kHLOsMNiDGgumVB=gYRMojtdPc6UCO6Q@mail.gmail.com> <2618.1336965987@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox