Re: SPI & file locations

Поиск
Список
Период
Сортировка
От Lamar Owen
Тема Re: SPI & file locations
Дата
Msg-id 00052619360400.00745@lorc.wgcr.org
обсуждение исходный текст
Ответ на Re: SPI & file locations  (Mike Mascari <mascarm@mascari.com>)
Ответы Re: SPI & file locations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, 26 May 2000, Mike Mascari wrote:
> Ron Peterson wrote:
> > After installation, shouldn't everything you need be in
> > /usr/local/pgsql?

Too many assumptions are in the source that the source will always be there.
Not necessarily true!

> I too have run into this dependency problem. The number of
> headers required to compile an SPI code module is around 80, if I
> recall correctly. Lamar Owen was good enough to include those
> headers as apart of the RPM distribution and they would go into
> /usr/include/pgsql. I believe he got the dependency list from
> Oliver Elphick who manages the Debian package, so that should be

For PostgreSQL 7.0-2 and above, the SPI header list is dynamically generated
during package build and manually copied into place using the following
one-liner:

/lib/cpp -M -I. -I../backend executor/spi.h |xargs -n 1|grep \\W|grep -v ^/|grep -v spi.h | sort |cpio -pdu
$RPM_BUILD_ROOT/usr/include/pgsql

Replace $RPM_BUILD_ROOT/usr/include/pgsql with the directory of your choice,
and run this one-liner when the cwd is in src/include in the PostgreSQL source
tree.  The sort is optional, of course.

This could easily enough be included in the make install, couldn't it?
(Tom?  Anyone?)  I realize that GNU grepisms (or is \W common?) are used above,
but, after all, I _know_ my one-liner in the RPM spec file installation section
is going to be running on RedHat with a complete development environment, so it
wasn't designed to be portable.  I also realize the regexps could be tuned to
only need a single grep invocation, but, it works and works nicely as-is in the
RPM building environment.

Oh, BTW, there's the same number of header includes as there were with 6.5.3,
but there are differences in the list....  SPI development CAN be done without
26+ MB of source code taking up space -- Mike is _doing_ it, IIRC.  In fact,
Mike is the one who prodded me to get it working in the RPMs.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Smith
Дата:
Сообщение: Re: INSERT WITH SELECT help
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: SPI & file locations