Re: pg_dump doesn't restore on newer database due to schema issues (bug or limitation?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump doesn't restore on newer database due to schema issues (bug or limitation?)
Date: 2013-10-21 14:47:45
Message-ID: 28694.1382366865@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> writes:
> When trying to move a database from 8.3 to 9.2.5, the plain text pg_dump
> did not restore without errors. (I used pg_dump from 9.2.5) The problem
> seems to relate to references to other schemas and the schema search paths.

What this looks like to me is that you have a SQL function which isn't
protecting itself against changes in search_path. It could fail in any
context where somebody's changed search_path, not just a restore run.
You should consider fully qualifying the table reference in the function's
source code, or adding a "SET search_path" clause to the function
definition.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2013-10-21 15:11:43 pg_dump resulting in excessive memory use by postmaster process
Previous Message Adrian Klaver 2013-10-21 13:55:38 Re: pg_dump doesn't restore on newer database due to schema issues (bug or limitation?)