Refactoring of running other programs

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Refactoring of running other programs
Date: 2004-05-11 21:56:33
Message-ID: 200405112156.i4BLuXs24919@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries. I move FindExec into
port/exec.c (and renamed it to find_my_binary()). I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.

The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller. The new code throws an error. The old
behavior seemed too error prone for version mismatches.

Patch attached and applied. I am not doing the standard application
delay because I want to continue on to relocatable installs. I will make
any suggested adjustments.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 36.8 KB
unknown_filename text/plain 8.2 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Mahesh Swamy 2004-05-12 02:07:50 SQLState
Previous Message Magnus Hagander 2004-05-11 13:56:23 Re: pgkill for windows