From: Tom Lane <tgl@sss.pgh.pa.us>
To: Igor Korot <ikorot01@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Splitting libpq build
Date: Sun, 03 Oct 2021 18:27:37 -0400
Message-ID: <3917659.1633300057@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+FnnTxDLrRuo2DkTuKQ4fEzuErQ_QtL_2b38mjK7WuFsjzSxg@mail.gmail.com>
References: <CA+FnnTwRdLKtQpny0fRUK59Xj2SXjLSsmPZpe-+UbSTG-fnHqA@mail.gmail.com>
<3910785.1633291909@sss.pgh.pa.us>
<CA+FnnTx=cBq9QEVLn8CCFK46JHLSVmeYDe1qDBu4t_q040m_=A@mail.gmail.com>
<5c02c856-62ad-4a16-ace3-ce9988c01737@aklaver.com>
<CA+FnnTxDLrRuo2DkTuKQ4fEzuErQ_QtL_2b38mjK7WuFsjzSxg@mail.gmail.com>
Igor Korot <ikorot01@gmail.com> writes:
> Imagine you are a developer/maintainer of sme software. This software needs to
> connect to different DBMSes perform soe operations and then disconnect.
> It is very easy to say that I have SQLite as a submodule in my Git tree,
> I have mysql-connector as a submodule, but I can't have libpq this way
> because it is hidden deep down inside PostgreSQL sources.
To be blunt, that is an absolutely horrid way to distribute software.
You should not, not, not be redistributing other people's code,
because that puts you on the hook to keep up with their bug fixes ---
particularly security-critical fixes, which do happen from time to time.
That's a loop you don't want to be in.
In this case I don't even see what's the point. If somebody wants to
use your code with Postgres, it's just about certain that they already
have an installed copy of libpq, from wherever they get Postgres from.
The same argument applies to mysql or SQLite. So you should be
expecting to link against already-present libraries, not bring your
own. Do you bring your own libc, or openssl, or C compiler?
I can tell you for certain that if your package were to be picked up
and redistributed by Red Hat, or Debian, or any other open-source
vendor, the very first thing they'd do is strip it of any such copied
code. They don't want the management hassle of having to update
multiple copies of libpq or mysql-connector or other stuff.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ikorot01@gmail.com, adrian.klaver@aklaver.com
Subject: Re: Splitting libpq build
In-Reply-To: <3917659.1633300057@sss.pgh.pa.us>
References: <CA+FnnTwRdLKtQpny0fRUK59Xj2SXjLSsmPZpe-+UbSTG-fnHqA@mail.gmail.com> <3910785.1633291909@sss.pgh.pa.us> <CA+FnnTx=cBq9QEVLn8CCFK46JHLSVmeYDe1qDBu4t_q040m_=A@mail.gmail.com> <5c02c856-62ad-4a16-ace3-ce9988c01737@aklaver.com> <CA+FnnTxDLrRuo2DkTuKQ4fEzuErQ_QtL_2b38mjK7WuFsjzSxg@mail.gmail.com> <3917659.1633300057@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox