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

From Robert Haas
Subject Re: pg_dump: SQL command failed
Date
Msg-id CA+TgmoaQujKirnQaYv7R1n_13iY85rYd==LCFk9SgPkHzXMMUQ@mail.gmail.com
Whole thread Raw
In response to pg_dump: SQL command failed  (Thangalin <thangalin@gmail.com>)
Responses Re: pg_dump: SQL command failed  (Thangalin <thangalin@gmail.com>)
List pgsql-bugs
On Sun, May 13, 2012 at 10:46 PM, Thangalin <thangalin@gmail.com> wrote:
> Hi,
>
> REPLICATE
>
> 0. Create a new database (superdatabase)
> 1. Create a new schema (superschema)
> 2. Add the unaccent extension to the schema:
> CREATE EXTENSION unaccent;
> 3. Create a wrapper for unaccent that exposes an IMMUTABLE interface (this
> is side issue):
>
> CREATE OR REPLACE FUNCTION superschema.unaccent_text(text)
> =A0 RETURNS text AS
> $BODY$
> =A0 -- unaccent is STABLE, but the indexes must use IMMUTABLE functions.
> =A0 SELECT unaccent($1);
> $BODY$
> =A0 LANGUAGE sql IMMUTABLE
> =A0 COST 1;
>
> 4. Dump the schema using pg_dump:
>
> pg_dump -n superschema --inserts superdatabase > superduper.sql

I just tried this exact series of steps and it worked for me.  What
version are you using?

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #6637: Casablanca timezone is wrong
Next
From: Tom Lane
Date:
Subject: Re: BUG #6626: union all with values of type "unknown"