Mac version can't dump/restore

From: John DeSoi <desoi(at)pgedit(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Mac version can't dump/restore
Date: 2006-03-16 14:28:52
Message-ID: 07ABF998-05AF-4CE9-A317-CB252ED11126@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I get this error when trying to dump a database:

/Applications/pgAdmin3.app/Contents/SharedSupport/helper/pg_dump -i -
h localhost -p 5432 -U user -F c -b -v -f "/temp/test" test
dyld: Library not loaded: /usr/local/pgsql/lib/libpq.4.dylib
Referenced from: /Applications/pgAdmin3.app/Contents/SharedSupport/
helper/pg_dump
Reason: image not found

Process returned exit code -1.

The problem is the pg_dump utility hard codes the path of libpq. This
is not very workable because not only can that be customized, some
one using pgAdmin might not have PostgreSQL installed at all on the
local machine.

Here is how I setup pgEdit on the Mac which may be a good solution.

1. Put libpq.dylib in the same folder with pg_dump/pg_restore and
include it in the distribution.
2. Use install_name_tool on each postgresql executable to have it
reference the library relative to the executable folder. Example:

install_name_tool -change /usr/local/pgsql/lib/libpq.4.dylib
@executable_path/libpq.4.1.dylib pg_restore

Also, I noticed that the pgAdmin package has PkgInfo at the same
level as the Contents folder. I thought it should be in the Contents
folder.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

Browse pgadmin-support by date

  From Date Subject
Next Message Alessandro @ GMail 2006-03-16 15:52:44 weird problem with pgadmin & postgres on debian
Previous Message Harald Armin Massa 2006-03-16 12:16:07 Re: pgAdminIII query window: How to use more then 1 connection?