CREATE FUNCTION .. SET vs. pg_dump - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject CREATE FUNCTION .. SET vs. pg_dump
Date
Msg-id 5210AA60.4030306@kaltenbrunner.cc
Whole thread Raw
Responses Re: CREATE FUNCTION .. SET vs. pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi all!


While working on upgrading the database of the search system on
postgresql.org to 9.2 I noticed that the dumps that pg_dump generates on
that system are actually invalid and cannot be reloaded without being
hacked on manually...

Simple way to reproduce is using the following:



CREATE TEXT SEARCH CONFIGURATION pg (   PARSER = pg_catalog."default" );

CREATE FUNCTION test() RETURNS INTEGER
LANGUAGE sql SET default_text_search_config TO 'public.pg' AS $$
SELECT 1;
$$;


once you dump that you will end up with an invalid dump because the
function will be dumped before the actual text search configuration is
(re)created. I have not checked in any more detail but I suspect that
this problem is not only affecting default_text_search_config.


Stefan



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Feature Request on Extensions
Next
From: Hannu Krosing
Date:
Subject: Re: Feature Request on Extensions