Re: [HACKERS] plPHP in core? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [HACKERS] plPHP in core?
Date
Msg-id 200504090110.j391Ar011319@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] plPHP in core?  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
Joshua D. Drake wrote:
>
> >
> >Or were you trying to say "let's ship it, and I don't care if major
> >Linux distributors refuse to include it in their packaging because it's
> >too hard to build that way"?
> >
> Close but not quite :). I was saying that Linux distributors are
> going to do what their users want. Otherwise the distribution
> dies.
>
> So just because it is in core doesn't mean they have to package.
> Also, alot of people compile from tarball to get an optimized version.
> So having plPHP in core would be helpful for them.
>
> >  Somehow that doesn't seem to square with
> >the goal of making plPHP more available rather than less so.
> >
> >
> Very true :)

I read this thread on dependency and plphp.  I think the major issues
are circular dependencies and maintainability.

One of the big reasons for shipping PL languages as part of our
distribution is that they are so closely tied to the backend that it is
hard for them to make versions that work with different releases of the
PostgreSQL internals, so they just ship with a specific version of
PostgreSQL. This is why ecpg is also part of our source tree because it
is tied the grammar.  We _could_ decouple it and the PL languages, but
it is more trouble than it is worth.

I understand what Tom is saying --- that putting pl/php into our tree
adds a cirular dependency that didn't exist before.  Right now it is:

    pg -> php -> pl/php

and with it integrated into our build it is:

    pg (no pl/php)-> php -> pg with pl/php

However, we don't have to compile pl/php by default, and in fact we
don't compile pl/perl by default either.

I think a good solution would be to add pl/php into our tree and print a
message end of the configure run stating that pl/php has to be
compiled/installed manually from the src/pl/php directory after PHP is
installed, of course only if pl/php is enabled as a configure flag.

This gets pl/php into our tree (for easy maintenance), but eliminates
the circular dependency.

(FYI, PL/R isn't distributed with PostgreSQL because of its license.)

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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can't install plpython on Windows 8.0
Next
From: Bruce Momjian
Date:
Subject: Re: Question about format_type function