Skip site navigation (1) Skip section navigation (2)

Re: pg_dump: SQL command failed

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thangalin <thangalin(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dump: SQL command failed
Date: 2012-05-22 19:55:37
Message-ID: CA+TgmoaQujKirnQaYv7R1n_13iY85rYd==LCFk9SgPkHzXMMUQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Sun, May 13, 2012 at 10:46 PM, Thangalin <thangalin(at)gmail(dot)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)
>   RETURNS text AS
> $BODY$
>   -- unaccent is STABLE, but the indexes must use IMMUTABLE functions.
>   SELECT unaccent($1);
> $BODY$
>   LANGUAGE sql IMMUTABLE
>   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?

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

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2012-05-22 19:55:49
Subject: Re: BUG #6626: union all with values of type "unknown"
Previous:From: Robert HaasDate: 2012-05-22 19:47:37
Subject: Re: BUG #6637: Casablanca timezone is wrong

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group