Re: BeOS and IPC - try 999

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: david(at)jetnet(dot)co(dot)uk
Cc: pgsql-patches(at)postgresql(dot)org, "Adam Val-Jean Haberlach" <adam(at)be(dot)com>
Subject: Re: BeOS and IPC - try 999
Date: 2000-06-14 16:35:44
Message-ID: 14983.961000544@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"David Reid" <david(at)jetnet(dot)co(dot)uk> writes:
> OK, agreed (up to a point). So, you want easier maintenance? The ONLY
> way that I can think of doing it is to have the platform specific IPC
> stuff in it's own file, hence this patch. The core functions, the ones
> that have no platform specific code in them, still live in ipc.c but all
> the functions that are touched by platform code live in either
> ipc_unix.c or ipc_beos.c.

This is a step forward from what you had, for sure. I'm not sure if
the separate-files approach is really good, though, compared to
a pattern like

int IPCFunction()
{
#ifdef BEOS
BEOS code
#else
unix code
#endif
}

for each function. The thing that scares me about separate files
is the out-of-sight, out-of-mind problem: if you make a change
in one file, will you remember to update the corresponding code
in the other files (if there is any)?

OTOH the code for each platform is certainly cleaner this way.

Comments anyone?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2000-06-14 16:36:25 Re: Big 7.1 open items
Previous Message Tom Lane 2000-06-14 15:36:20 Re: Big 7.1 open items