Re: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-23 Thread Tom Lane
"Regina Obe" writes: >> You don't really need any new syntax for this particular case, I think. >> You can declare the function in the extension like this: >> create function ... set search_path from current; > But then the search_path would be local variable to the function. Wouldn't > that

RE: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-23 Thread Regina Obe
> > > a) In this particular case, I have a function that uses fuzzystrmatch and is > used in functional indexes. > > I unfortunately can't schema qualify the use of soundex, because I > > don't know where the user may have installed fuzzystrmatch is > > installed > > b) Stephen Frost had

Re: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-23 Thread Tom Lane
"Regina Obe" writes: > Sorry for not posting from the thread. Paul alerted me to this one and I am > aware of the issue. > 1) I do have fuzzstrmatch listed as a dependency in the control file. I know > because I often install the geocoder with > CREATE EXTENSION postgis_tiger_geocoder

RE: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-23 Thread Regina Obe
> From: Paul Ramsey [mailto:pram...@cleverelephant.ca] > Sent: Monday, July 23, 2018 2:42 PM > To: Regina Obe > Subject: Fwd: "interesting" issue with restore from a pg_dump with a > database-wide search_path > > Seen this one? > P > > > -- Forwarded message -- > From: Tom Lane

Re: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-06 Thread Tom Lane
Larry Rosenman writes: > On Fri, Jul 06, 2018 at 11:35:41AM -0700, Joshua D. Drake wrote: >> Knowing the errors would be helpful. > pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 12; 3079 887963 EXTENSION > postgis_tiger_geocoder >

Re: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-06 Thread Larry Rosenman
On Fri, Jul 06, 2018 at 11:35:41AM -0700, Joshua D. Drake wrote: > On 07/06/2018 11:27 AM, Larry Rosenman wrote: > > when I pg_dump -Fc the database and then try to restore it after a > > create database, I get errors. To get a clean restare I need to do: > > Knowing the errors would be helpful.

Re: "interesting" issue with restore from a pg_dump with a database-wide search_path

2018-07-06 Thread Joshua D. Drake
On 07/06/2018 11:27 AM, Larry Rosenman wrote: when I pg_dump -Fc the database and then try to restore it after a create database, I get errors. To get a clean restare I need to do: Knowing the errors would be helpful. jD --- \set DB `echo ${DB}` CREATE SCHEMA IF NOT EXISTS postgis; CREATE